Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: emit an error in 'go mod vendor' if any replacement is in the vendor directory #29169

Closed
bcmills opened this issue Dec 10, 2018 · 1 comment
Labels
FrozenDueToAge GoCommand cmd/go modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Dec 10, 2018

There is significant overlap between replace directives and the vendor directory, and users sometimes conflate the two (#29079 (comment)).

Since go mod vendor removes and replaces the entire contents of the vendor directory, it will fail (or at least produce very confusing behavior) if a replace directive points into vendor. We should detect that condition explicitly and emit a useful error.

(CC @jayconrod)

@bcmills bcmills added NeedsFix The path to resolution is known, but the work has not been done. GoCommand cmd/go modules labels Dec 10, 2018
@bcmills bcmills added this to the Go1.13 milestone Dec 10, 2018
@gopherbot
Copy link

Change https://golang.org/cl/156400 mentions this issue: emit an error in 'go mod vendor' if any replacement is in the vendor directory

@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
@smasher164 smasher164 modified the milestones: Backlog, Go1.14 Oct 11, 2019
@ianlancetaylor ianlancetaylor modified the milestones: Go1.14, Backlog Dec 5, 2019
@golang golang locked and limited conversation to collaborators Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go modules NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants