-
Notifications
You must be signed in to change notification settings - Fork 17.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go/internal/modload: record the replacement for the module contai…
…ning package main in BuildInfo Fixes #37392 Change-Id: I2cb051e6f556b0af95e059611dda3f62e7c1f21a Reviewed-on: https://go-review.googlesource.com/c/go/+/220645 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
- Loading branch information
Bryan C. Mills
committed
Feb 24, 2020
1 parent
363cd66
commit e092fc3
Showing
5 changed files
with
90 additions
and
36 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
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,33 @@ | ||
[short] skip | ||
|
||
go mod download example.com/printversion@v0.1.0 example.com/printversion@v1.0.0 | ||
|
||
go install example.com/printversion | ||
|
||
go run example.com/printversion | ||
cmp stdout out.txt | ||
|
||
go version -m $GOPATH/bin/printversion | ||
stdout '^.*[/\\]bin[/\\]printversion: .*$' | ||
stdout '^ path example.com/printversion$' | ||
stdout '^ mod example.com/printversion v0.1.0$' | ||
stdout '^ => example.com/printversion v1.0.0 h1:.*$' | ||
stdout '^ dep example.com/version v1.0.0$' | ||
stdout '^ => example.com/version v1.0.1 h1:.*$' | ||
|
||
-- go.mod -- | ||
module golang.org/issue/37392 | ||
go 1.14 | ||
require ( | ||
example.com/printversion v0.1.0 | ||
) | ||
replace ( | ||
example.com/printversion => example.com/printversion v1.0.0 | ||
example.com/version v1.0.0 => example.com/version v1.0.1 | ||
) | ||
-- out.txt -- | ||
path is example.com/printversion | ||
main is example.com/printversion v0.1.0 | ||
(replaced by example.com/printversion v1.0.0) | ||
using example.com/version v1.0.0 | ||
(replaced by example.com/version v1.0.1) |
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