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: GORACE, GOGC, GOMAXPROCS, GOTRACEBACK are not documented in go help environment #50444

Open
AlekSi opened this issue Jan 5, 2022 · 4 comments
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@AlekSi
Copy link
Contributor

AlekSi commented Jan 5, 2022

What version of Go are you using (go version)?

Both 1.17.5 and the current tip.

What did you do?

Run go help environment.

What did you expect to see?

Documentation for all environment variables that affect Go in one place, including GORACE, GOGC, GOMAXPROCS, GOTRACEBACK.

What did you see instead?

Those environment variables are not mentioned.

@AlekSi AlekSi changed the title cmd/go: GORACE is not documented in go help environment cmd/go: GORACE, GOGC, GOMAXPROCS, GOTRACEBACK are not documented in go help environment Jan 5, 2022
@AlekSi
Copy link
Contributor Author

AlekSi commented Jan 5, 2022

GOGC, GOMAXPROCS, and GOTRACEBACK are not documented too. Knowing that, I was able to find #37004. Updated title and description to make this issue easier to find.

It is quite inconvenient that there is no single place with all environment variables. Maybe go env can be modified to show them too.

@rsc
Copy link
Contributor

rsc commented Jan 5, 2022

go env and go help environment show the variables that matter to building Go programs.
The ones listed here matter to running Go programs and are documented in 'go doc runtime'.
We should not confuse matters by expanding the go command to document things that don't have to do with the go command.

@AlekSi
Copy link
Contributor Author

AlekSi commented Jan 5, 2022

I think things are already quite confusing. For example, GODEBUG affects both go command and runtime. It is shown in go help environment output like that:

	GODEBUG
		Enable various debugging facilities. See 'go doc runtime'
		for details.

So it mentions runtime, but not how it affects go command. Additionally, even setting GODEBUG to something that affects go command (for example, export GODEBUG=gocacheverify=1) does not add it to go env output, and go env GODEBUG prints nothing.

@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 7, 2022
@cagedmantis cagedmantis added this to the Backlog milestone Jan 7, 2022
@cagedmantis
Copy link
Contributor

/cc @bcmills @matloob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants