-
Notifications
You must be signed in to change notification settings - Fork 18k
x/vgo: vgo refuses to get the latest version of a package #25527
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
progressbar has a bad go.mod file It needs to update it's go.mod file for all v >= 2 tags to say |
@AlexRouSg thanks. I didn't realize that so I made that change schollz/progressbar@85ec7a0. However after doing that I still can't seem to get a build with v2:
|
You have not tagged a v2 release that uses the new go.mod file |
@AlexRouSg Tagged here: https://github.com/schollz/progressbar/releases/tag/v2.1.1 Still errored:
|
Ok so auto generating the go.mod file for v2 seems broken But if you manually create it with |
I think this is related to the bug where vgo fails to read go.mod files where the module is not quoted. https://go-review.googlesource.com/c/vgo/+/114058 Try using
|
Thanks. It is working now with the newest version of |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?What did you do?
I'm trying to move from
dep
tovgo
in one of my programs, croc. I currently have a build that works, however if I dovgo get -u
which will upgrade all modules needed by the build, it actually downgrades progressbar from v2.1.0 to v1.0.0 and causes my build to fail.You can try this yourself to see what I mean. You can reproduce my problem with the following:
I've also tried modifying the
go.mod
to include the hash version of the newest progressbar, but it still reverts to v1.0.0. I've also tried upgrading byvgo get github.com/schollz/progressbar
with the same result.When I use
vgo list -m -u
it doesn't show that there is a new version ofprogressbar
available:Edit: I just realized I need to update the package in the imports, but when I do that I still have a problem:
What did you expect to see?
I tried four ways to get croc to use v2.1.0 of
github.com/schollz/progressbar
: I manually editedgo.mod
to include v2.1.0, I usedvgo get -u
and I usedvgo get github.com/schollz/progressbar
and I edited the import to includegithub.com/schollz/progressbar/v2
. In each case, I expected thego.mod
will update to use v2.1.0.What did you see instead?
In every way I tried, I would instead see that the
go.mod
would include the progressbar versionv1.0.0
and not the latest, which I tried to update to,v2.1.0
.The text was updated successfully, but these errors were encountered: