-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: go install with getmode vendor and mod sync issue #26704
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
Comments
CC @bcmills |
I'm not able to reproduce this issue with the A complete repository that demonstrates it would be ideal: there may be some subtle interaction with the imports of your program (or the other packages in the module) that we cannot infer from the reported information.
|
@bcmills Will try repro with head. Thanks for getting back. |
(I'm using satori/go.uuid as an example, there are 30+ indirect items getting removed then re-added with latest tag available) Will try and put together a public repro.
|
@bcmills I've put together a contrived example. I found it odd that
|
@gopherbot, please remove label waitingforinfo |
Vendor is still written as though it has complete knowledge of the graph, like tidy, but it does not. So it must not fiddle with indirect tags. |
Change https://golang.org/cl/128899 mentions this issue: |
My earlier diagnosis about vendor was wrong; go mod vendor is behavior correctly. The problem is go install -mod=vendor, which is incorrectly assuming it knows anything about the module graph and has any justification for updating go.mod. It does not. |
What version of Go are you using (
go version
)?go version go1.11beta2 darwin/amd64
Does this issue reproduce with the latest release?
Yes.
What did you do?
What did you expect to see?
The go.mod to reflect the dependencies prior to running
go install
. Specifically, was expecting many indirect entries to remain the same.What did you see instead?
Running the above removed many indirect entries from go.mod and replaced with latest available. E.g., this is one of the entries in go.mod prior to
go install
:go.mod:
vendor/modules.txt:
go install -getmode=vendor ./cmd/xyz
removed the indirect entry for v1.1.0 from go.modthen
go mod -sync
added v1.2.0 to go.mod:The text was updated successfully, but these errors were encountered: