-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: issuing mod edit -retract allows bad version format #43280
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
Should |
For So I think we should continue to accept non-canonical versions for at least |
It appears this would be a simple case of adding validation of the input versions to File.AddRetract? If that is indeed the case I can come up with a CL for that. Would the same make sense for File.AddExclude? |
Yep, the I'm not sure whether we should reject non-canonical versions for |
By testing |
Thanks. Then we should probably validate in |
Change https://golang.org/cl/279394 mentions this issue: |
Version strings set by -retract and -exclude are not canonicalized by go mod commands. This change adds validation to go mod edit to prevent invalid version strings from being added to the go.mod file. For golang/go#43280 Change-Id: I3708b7a09111a56effac1fe1165122772e3f2d75 Reviewed-on: https://go-review.googlesource.com/c/mod/+/279394 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> Trust: Michael Matloob <matloob@golang.org>
Change https://golang.org/cl/283853 mentions this issue: |
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?
Changed directory to my project and issued the following commands
Then received the following error.
What did you expect to see?
Issuing the command
go mod edit -retract 1.0.0
should have warned me the version format was wrong.What did you see instead?
The text was updated successfully, but these errors were encountered: