-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: module loading should not silently replace nonexistent versions with valid ones #31411
Comments
Was there a specific piece of documentation that led you to |
None really, just SO. But as for the second point, even if go mod is wrong- should go run silently override the requirement (or does it only do so for invalid entries)? |
In general all of the On the other hand, if the existing version was completely invalid (not just too early to satisfy the necessary imports, we should probably diagnose that explicitly rather than silently “upgrading” from the invalid version to a valid one. |
(CC @jayconrod for |
Closing this one as no longer a priority. Thanks for your support. |
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
)?go env
OutputWhat did you do?
Trying to require a specific branch:
What did you expect to see?
Dependencies added to
go.mod
What did you see instead?
Error:
for this
go.mod
:If the branch for is invalid it should probably not be allowed to add it using
go mod edit
. Because doing so will silently override the dependency when doing ago run
instead of the 2ndgo mod edit
which is highly non-obvious.The text was updated successfully, but these errors were encountered: