-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: -help
and go version
are broken when go.mod contains non-standard version
#60956
Comments
--help
and go version
broken when go.mod contains non-standard version-help
and go version
are broken when go.mod contains non-standard version
Is it possible to have this fixed in a go1.21 patch release? I see this was moved to go1.22, but this looks like a regression to me. |
This issue still needs to be investigated. It it's determined that the current behavior is buggy, the fix will need to be developed for Go 1.22 first before it can be considered for backport to a minor release of Go 1.21. To me, it seems that at least the
Consider a local toolchain version of "go1.21rc4" and a go.mod file whose "go" line is "go1.21.0". Running Similarly, it probably makes sense that |
@thaJeztah, I think it is important that we print an error and return with nonzero exit status in this case, but perhaps the error message we print in case of a failed upgrade could be more helpful?
But it's tricky, because additional information risks adding to the confusion instead of clarifying it. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
See above
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: