-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
all: run.{bash,bat,rc} sets GOPATH inconsistently #45238
Comments
Fixed by CL 288818. |
@gopherbot Please consider this for backport. This should be a test-only fix, since releases use make.bash (all.bash is used only during release testing), and is needed to be able to run long tests for future 1.16 and 1.15 minor releases (issue #29252). |
Backport issue(s) opened: #45239 (for 1.15), #45240 (for 1.16). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/304772 mentions this issue: |
Change https://golang.org/cl/304773 mentions this issue: |
…un.bat, run.rc We used to clear GOPATH in all the build scripts. Clearing GOPATH is misleading at best, since you just end up with the default GOPATH (%USERPROFILE%\go on Windows). Unless that's your GOROOT, in which case you end up with a fatal error from the go command (#43938). run.bash changed to setting GOPATH=/dev/null, which has no clear analogue on Windows. run.rc still clears GOPATH. Change them all to set GOPATH to a non-existent directory /nonexist-gopath or c:\nonexist-gopath. For #45238. Fixes #45239. Change-Id: I51edd66d37ff6a891b0d0541d91ecba97fbbb03d Reviewed-on: https://go-review.googlesource.com/c/go/+/288818 Trust: Russ Cox <[email protected]> Trust: Jason A. Donenfeld <[email protected]> Reviewed-by: Cherry Zhang <[email protected]> Reviewed-by: Alex Brainman <[email protected]> Reviewed-by: Jason A. Donenfeld <[email protected]> (cherry picked from commit bb6efb9) Reviewed-on: https://go-review.googlesource.com/c/go/+/304773 Run-TryBot: Dmitri Shuralyov <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Alexander Rakoczy <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Trust: Carlos Amedee <[email protected]>
…un.bat, run.rc We used to clear GOPATH in all the build scripts. Clearing GOPATH is misleading at best, since you just end up with the default GOPATH (%USERPROFILE%\go on Windows). Unless that's your GOROOT, in which case you end up with a fatal error from the go command (#43938). run.bash changed to setting GOPATH=/dev/null, which has no clear analogue on Windows. run.rc still clears GOPATH. Change them all to set GOPATH to a non-existent directory /nonexist-gopath or c:\nonexist-gopath. For #45238. Fixes #45240. Change-Id: I51edd66d37ff6a891b0d0541d91ecba97fbbb03d Reviewed-on: https://go-review.googlesource.com/c/go/+/288818 Trust: Russ Cox <[email protected]> Trust: Jason A. Donenfeld <[email protected]> Reviewed-by: Cherry Zhang <[email protected]> Reviewed-by: Alex Brainman <[email protected]> Reviewed-by: Jason A. Donenfeld <[email protected]> (cherry picked from commit bb6efb9) Reviewed-on: https://go-review.googlesource.com/c/go/+/304772 Run-TryBot: Dmitri Shuralyov <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Alexander Rakoczy <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Trust: Carlos Amedee <[email protected]>
The run scripts have diverged in their normalization of the GOPATH environment variable. They used to all clear it, but that stopped being effective when Go 1.8 introduced a default GOPATH value (see https://golang.org/doc/go1.8#gopath).
run.bash has started to set it to /dev/null, while run.bat and run.rc were never updated.
Setting GOPATH to /dev/null has no analogue on Windows, and causes problems for some cmd/go tests (which are skipped in short mode, so they only run on longtest builders or when run explicitly):
CC @bcmills, @rsc, @golang/release.
The text was updated successfully, but these errors were encountered: