-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go: do not embed checksums when building with vendor
Fixes golang#46400 Tested: Ran go test cmd/go Change-Id: I60655129c55d40a70a13ed23937ef990f315fd73 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/564195 Reviewed-by: Bryan Mills <[email protected]> Run-TryBot: Sam Thanawalla <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Commit-Queue: Sam Thanawalla <[email protected]>
- Loading branch information
1 parent
edb7c67
commit c9124cc
Showing
2 changed files
with
33 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This test verifies that GOMODCACHE does not affect whether checksums are embedded | ||
# with vendored files. | ||
# See issue #46400 | ||
[short] skip 'builds and links a binary twice' | ||
go mod tidy | ||
go mod vendor | ||
|
||
go build -mod=vendor | ||
go version -m example$GOEXE | ||
cp stdout version-m.txt | ||
|
||
env GOMODCACHE=$WORK${/}modcache | ||
go build -mod=vendor | ||
go version -m example$GOEXE | ||
cmp stdout version-m.txt | ||
|
||
-- go.mod -- | ||
module example | ||
go 1.22 | ||
require rsc.io/sampler v1.3.0 | ||
|
||
-- main.go -- | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"rsc.io/sampler" | ||
) | ||
|
||
func main() { | ||
fmt.Println(sampler.Hello()) | ||
} |