-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: Proposal: Modules without releases have the newest code fetched when go get -u is ran. #33722
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
tag this with |
If I understand correctly, this is already the intended behavior. If you run If you're using a proxy (for example, if you're using go1.13beta1, Note that |
Thanks for your reply jayconrod. I am not suggesting a change to I think the existing behavior is expected and works well in all circumstances where module releases exist, but not when the module maintainer hasn't cut a release yet (effectively been running the module as version I am proposing that, in the case of there not being any releases for a module, If the maintainer has not specified a stable release of their module ( If we do not adopt this behavior, then developers have to know the hidden logic I described before:
|
This is what |
I just simulated this using a couple repos. I made a repo with module and a repo with an app that uses it. I did the following with these two repos:
In order to actually get the Then, I found out today that by waiting for an hour or two, then re-running
Perhaps the behavior I am seeing (that you say already exists) only exists after some time has passed. My organization is not running any kind of module proxy and I have no environment variables configured to change the default proxy settings. So my ask remains the same, but with the additional qualifier that reproducing this requires you to act relatively quickly between making updates to an un-tagged module and running |
Thanks for posting this example. From your description, I believe this is the same as #32870, so I'll close this issue. As mentioned above, go1.13 uses a module proxy by default. If you have no other setting, you should see that You can work around this issue by setting |
Thanks @jayconrod ! Having this issue de-duped is valuable and I appreciate your careful consideration. |
Currently modules that have no releases do not fetch the latest code, even when
go get -u
is run. Essentially there is a user-hostile edge-case ingo get
workflow:If the dependency has releases, then use
go get -u
, else usego get module/path@master
The code that was present on the first
go get
of the module is still used until a new release is cut andgo get -u
is run. It is possible to manually update the module without a release by doinggo get module/path@master
, but I think it would make sense to see this behavior be the default for modules without releases.Steps to reproduce
go get -u
the unreleased module from your other programThe text was updated successfully, but these errors were encountered: