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: emits warning when GOPATH == GOROOT #65656
Comments
It's definitely still possible, because I do it as well.
Your GOPATH and GOROOT are the same. If Go is installed in |
What does "must" here mean? Did the meaning of "must" changed in 1.22? No warning was emitted and plugins silently worked until 1.21.7, without making GOPATH and GOROOT different. Interestingly, no warning is emitted on current head of go.git tree.
This warning is emitted if I do $ echo 'go1.23devel' > VERSION before building current head of go.git tree. Why does creating the VERSION file cause this warning message to appear? |
The VERSION file has no effect, your testing of it is wrong. I believe this is working as intended, |
The VERSION file indeed has some effect. Full bisection between go1.21rc1~1 and
Since I was able to use go without problems using default GOPATH value, I don't My expectation is that we don't need to take care of GOPATH and GOROOT because |
Although If you use |
Go version
go version go1.22.0 linux/amd64
Output of
go env
in your module/workspace:What did you do?
I noticed that go 1.22 started emitting
and VSCode plugin noisily emits "Failed to run ..." messages
due to this warning message.
Installing under $HOME worked without problems until go 1.21.7.
Also, full bisection between go1.21.0 and go1.22.0 pointed at
commit fa72f3e ("[release-branch.go1.22] go1.22rc1").
If this is an intentional change, please update https://go.dev/doc/install
to explicitly comment that installing under $HOME is not possible.
Or maybe remove this warning from src/cmd/go/main.go , for this warning
is not fatal enough to justify "Failed to run ..." messages?
What did you see happen?
$ tar -C ~ -xzf go1.22.0.linux-amd64.tar.gz
$ export PATH=$PATH:~/go/bin/
$ go version
warning: GOPATH set to GOROOT (/home/kumaneko/go) has no effect
go version go1.22.0 linux/amd64
What did you expect to see?
$ tar -C ~ -xzf go1.22.0.linux-amd64.tar.gz
$ export PATH=$PATH:~/go/bin/
$ go version
go version go1.22.0 linux/amd64
The text was updated successfully, but these errors were encountered: