-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd: upgrade golang.org/x/mod to fix go.mod parser
modfile.Parse passed an empty string to the VersionFixer for the module path. This caused errors for v2+ versions. Fixes #44494 Change-Id: I13b86b6ecf6815c4bc9a96ec0668284c9228c205 Reviewed-on: https://go-review.googlesource.com/c/go/+/296131 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
- Loading branch information
Jay Conrod
committed
Feb 25, 2021
1 parent
3137da8
commit bcac57f
Showing
5 changed files
with
109 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# retract must not be used without a module directive. | ||
! go list -m all | ||
stderr 'go.mod:3: no module directive found, so retract cannot be used$' | ||
|
||
# Commands that update go.mod should fix non-canonical versions in | ||
# retract directives. | ||
# Verifies #44494. | ||
go mod edit -module=rsc.io/quote/v2 | ||
! go list -m all | ||
stderr '^go: updates to go.mod needed; to update it:\n\tgo mod tidy$' | ||
go mod tidy | ||
go list -m all | ||
cmp go.mod go.mod.want | ||
|
||
-- go.mod -- | ||
go 1.16 | ||
|
||
retract latest | ||
-- go.mod.want -- | ||
go 1.16 | ||
|
||
retract v2.0.1 | ||
|
||
module rsc.io/quote/v2 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters