-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: "go test" seems to now require git due to -buildvcs [1.18 backport] #51767
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
Labels
CherryPickApproved
Used during the release process for point releases
FrozenDueToAge
GoCommand
cmd/go
Milestone
Comments
Change https://go.dev/cl/393878 mentions this issue: |
zrma
added a commit
to zrma/1d1go
that referenced
this issue
Mar 19, 2022
…t requires git due to -buildvcs" backport - golang/go#51767 - golang/go#51723 > @bcmills requested issue #51723 to be considered for backport to the next 1.18 minor release. > > @gopherbot, please backport to Go 1.18. Invoking git for each go test of a package main is surprising and wastes users' time and battery power.
zrma
added a commit
to zrma/1d1go
that referenced
this issue
Mar 19, 2022
…ving "go test requires git due to -buildvcs" backport - golang/go#51767 - golang/go#51723 > @bcmills requested issue #51723 to be considered for backport to the next 1.18 minor release. > > @gopherbot, please backport to Go 1.18. Invoking git for each go test of a package main is surprising and wastes users' time and battery power.
zrma
added a commit
to zrma/1d1go
that referenced
this issue
Mar 19, 2022
… requires git due to -buildvcs" backport - golang/go#51767 - golang/go#51723 > @bcmills requested issue #51723 to be considered for backport to the next 1.18 minor release. > > @gopherbot, please backport to Go 1.18. Invoking git for each go test of a package main is surprising and wastes users' time and battery power.
Closed by merging d17c573 to release-branch.go1.18. |
gopherbot
pushed a commit
that referenced
this issue
Apr 4, 2022
…inaries Invoking a VCS tool requires that the VCS tool be installed, and also adds latency to build commands. Unfortunately, we had been mistakenly loading VCS metadata for tests of "main" packages. Users almost never care about versioning for test binaries, because 'go test' runs the test in the source tree and test binaries are only rarely used outside of 'go test'. So the user already knows exactly which version the test is built against, because the source code is right there — it's not worth the overhead to stamp. Fixes #51767. Updates #51723. Change-Id: I96f191c5a765f5183e5e10b6dfb75a0381c99814 Reviewed-on: https://go-review.googlesource.com/c/go/+/393894 Trust: Bryan Mills <[email protected]> Run-TryBot: Bryan Mills <[email protected]> Reviewed-by: Daniel Martí <[email protected]> Trust: Daniel Martí <[email protected]> TryBot-Result: Gopher Robot <[email protected]> (cherry picked from commit 67f6b8c) Reviewed-on: https://go-review.googlesource.com/c/go/+/393878 Reviewed-by: Cherry Mui <[email protected]>
jfkw
added a commit
to jfkw/connect-ng
that referenced
this issue
Apr 12, 2022
* go1.18+ detects VCS e.g. .git in sources https://go.dev/doc/go1.18#go-version * Default behavior -buildvcs=auto calls git to embed build info * VCS detection has effect of runtime soft dependency on git * Suppress in each RPM build section before go tool use * export GOFLAGS="-buildvcs=false" in RPM spec %build (go build) and %check (gotest) sections * go test will revert to buildvcs off behaviour in go1.18.1 per golang/go#51767 https://go-review.googlesource.com/c/go/+/393878/ * Alternatively add BuildRequires dependency on git * go1.18+ 'go version -m ./binaryname' also provides build info
jfkw
added a commit
to jfkw/connect-ng
that referenced
this issue
Apr 13, 2022
* go1.18+ detects VCS e.g. .git in sources https://go.dev/doc/go1.18#go-version * Default behavior -buildvcs=auto calls git to embed build info * VCS detection has effect of runtime soft dependency on git * Suppress in each RPM build section before go tool use * export GOFLAGS="-buildvcs=false" in RPM spec %build (go build) and %check (gotest) sections * Conditionals %rpm_vercmp around exports for backward compatibility with versions before go1.18 * go test will revert to buildvcs off behaviour in go1.18.1 per golang/go#51767 https://go-review.googlesource.com/c/go/+/393878/ * Alternatively rm .git or add BuildRequires dependency on git * go1.18+ 'go version -m ./binaryname' also provides build info
zrma
added a commit
to zrma/1d1go
that referenced
this issue
Apr 27, 2022
… requires git due to -buildvcs" backport - golang/go#51767 - golang/go#51723 > @bcmills requested issue #51723 to be considered for backport to the next 1.18 minor release. > > @gopherbot, please backport to Go 1.18. Invoking git for each go test of a package main is surprising and wastes users' time and battery power.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
CherryPickApproved
Used during the release process for point releases
FrozenDueToAge
GoCommand
cmd/go
@bcmills requested issue #51723 to be considered for backport to the next 1.18 minor release.
The text was updated successfully, but these errors were encountered: