-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go: add (and default to) -buildvcs=auto
[1.18 backport]
#51798
Comments
Now that this is approved and upstream issue is fixed, I took a look at creating a backport CL, and found there are a couple of conflicts involving load.PackageOpts.LoadVCS and Package.IsTestOnly. @bcmills Would you like to create the backport CL and resolve those conflicts? Thanks. |
Whoops, the release-branch.go1.18 branch I tested with was out of date—it's just the trivial alldocs.go conflict, so I'll make the backport CL. |
Change https://go.dev/cl/400454 mentions this issue: |
Closed by merging 24fcbb9 to release-branch.go1.18. |
…s the default When we added VCS stamping in the Go 1.18 release, we defaulted to -buildvcs=true, on the theory that most folks will actually want VCS information stamped. We also made -buildvcs=true error out if a VCS directory is found and no VCS tool is available, on the theory that a user who builds with '-buildvcs=true' will be very surprised if the VCS metadata is silently missing. However, that causes a problem for CI environments that don't have the appropriate VCS tool installed. (And we know that's a common situation because we're in that situation ourselves — see #46693!) The new '-buildvcs=auto' setting provides a middle ground: it stamps VCS information by default when the tool is present (and reports explicit errors if the tool errors out), but omits the metadata when the tool isn't present at all. Updates #51748. Updates #51999. Fixes #51798. Change-Id: Iebc955c2af0abca9b7517f62ca48b1d944eb2df4 Reviewed-on: https://go-review.googlesource.com/c/go/+/398855 Run-TryBot: Bryan Mills <[email protected]> Reviewed-by: Russ Cox <[email protected]> Reviewed-by: Michael Matloob <[email protected]> Auto-Submit: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]> (cherry picked from commit 4569fe6) Reviewed-on: https://go-review.googlesource.com/c/go/+/400454 Run-TryBot: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Bryan Mills <[email protected]>
Dockerfile fails with golang-1.18. It needs git until [1] is fixed. There are two options to fix it: 1. use 1.17 until -buildvcs=auto is added 2. add -buildvcs=false This PR uses the first option. [1]: golang/go#51798
@bcmills requested issue #51748 to be considered for backport to the next 1.18 minor release.
The text was updated successfully, but these errors were encountered: