-
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.
Revert "Revert "cmd/go/internal/modload: record the replacement for t…
…he module containing package main in BuildInfo"" This reverts CL 220722. Reason for revert: rolling forward with fix. Fixes #37392 Change-Id: Iba8b0c645267777fbb7019976292d691a10b906a Reviewed-on: https://go-review.googlesource.com/c/go/+/220898 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
- Loading branch information
Bryan C. Mills
committed
Feb 25, 2020
1 parent
b2696fd
commit 987e4e8
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$GOEXE | ||
stdout '^.*[/\\]bin[/\\]printversion'$GOEXE': .*$' | ||
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