-
Notifications
You must be signed in to change notification settings - Fork 18k
x/vgo: generated go.mod does not use the latest version of a subdependency #26030
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
With what contents in your |
@bcmills the content of my go.mod file at the root of my Go project is:
And that's all. I created this one by running the "vgo mod -init" without having any error from it. |
What packages do your Go source files import? Do they have any build constraints? Did you run any commands that would modify |
Quite a lot, it's to make microservice and they are all relative to go-kit librairies except the ones of my project packages. Note that it was working well with the old way inside a "$GOPATH/src/...". Do you want me to list them all? About build constraints I have none in my project. And I hope all the go-kit librairies don't have them either... Should I check all source code of these imported librairies? I don't exactly remember the order of the commands I executed 4 days ago so I just retried by:
I checked my "mod" directory where all dependencies have been download I can saw this one: Which is still in v1.0.0 instead of the v1.0.1 released on the repository. So I'm still thinking it could be a issue in vgo since none of the libraries are forcing "golang_protobuf_extensions" to v1.0.0. Tell me if you need more information, and thank you for helping me 😀 |
I tried to reproduce the issue starting with importing I wonder whether https://golang.org/cl/120999 fixed the underlying bug. Could you try building |
@bcmills yeah it works well with the new version! Thank you so much! Note that when my CI/CD tool try to run
It happens directly on the first dependency that vgo tries to download. Maybe you're still working on that? |
@bcmills I just noticed it seems that's a common issue while synchronizing accross different platform: |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.10 windows/amd64 vgo:2018-02-20.1
Does this issue reproduce with the latest release?
Yes (this is the latest)
What did you do?
Running either "vgo mod -sync" or "vgo mod -vendor"
What did you expect to see?
Everything working and a filled go.mod file
What did you see instead?
During the resolving/finding/adding process I get an error for a library I have imported in my project (github.com/go-kit/kit/metrics/prometheus).
(in english it means it doesn't find the testdata file)
While looking for a solution I found a similar issue:
matttproud/golang_protobuf_extensions#13
Indeed the released v1.0.1 of this plugin has fixed the wrong import but why vgo is downloading the v1.0.0 instead? I don't understand 😢
I checked the subdependencies from "github.com/go-kit/kit/metrics/prometheus" to "github.com/matttproud/golang_protobuf_extensions/pbutil" and no one has a "go.mod" file trying to force the v1.0.0 so what's happening hmmm?
It would be great if you could clarify this issue please.
Also, about UX: I found annoying that even with this error the process continue to analyze other dependencies. It results in loosing the error among a lot of:
I think the process should stop immediately after triggering the error, otherwise it should display a message at the end saying an error has occured.
Thank you 😃
EDIT: "Stupid note 😀 ": v1.0.0 and v1.0.1 tags target the same day "24 Apr 2016" (I don't know exactly how vgo sorts releases)
The text was updated successfully, but these errors were encountered: