Skip to content
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: document GOROOT/bin/go PATH entry for go test and go generate #57050

Open
bcmills opened this issue Dec 2, 2022 · 2 comments · May be fixed by #57814
Open

cmd/go: document GOROOT/bin/go PATH entry for go test and go generate #57050

bcmills opened this issue Dec 2, 2022 · 2 comments · May be fixed by #57814
Labels
Documentation GoCommand cmd/go help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@bcmills
Copy link
Member

bcmills commented Dec 2, 2022

CL 404134 (in Go 1.19) changed go test and go generate to always place GOROOT/bin at the beginning of the PATH list for the subprocess.

I added a release note for it (in CL 409176), but forget to update the documentation for the actual commands. It should be mentioned explicitly in the documentation for go test and go generate.

@bcmills bcmills added Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done. GoCommand cmd/go labels Dec 2, 2022
@bcmills bcmills added this to the Backlog milestone Dec 2, 2022
@shogohida
Copy link

shogohida commented Jan 15, 2023

Hi @bcmills, can I work on this? I assume I need to update the documentation in these files.

https://github.com/golang/go/blob/master/src/cmd/go/internal/generate/generate.go
https://github.com/golang/go/blob/master/src/cmd/go/internal/test/test.go

Should I refer to this?

cmd/go: place GOROOT/bin at the beginning of PATH in 'go generate' and 'go test'

This causes tests and generators that execute 'go' as a subprocess to
use the same go command as the parent 'go test' or 'go generate'
command.

@gopherbot
Copy link

Change https://go.dev/cl/461683 mentions this issue: cmd/go/internal: update documentation of go test and go generate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation GoCommand cmd/go help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants