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: go bug should use go env -changed #67769

Open
qiulaidongfeng opened this issue Jun 2, 2024 · 8 comments · May be fixed by #67770
Open

cmd/go: go bug should use go env -changed #67769

qiulaidongfeng opened this issue Jun 2, 2024 · 8 comments · May be fixed by #67770
Labels
GoCommand cmd/go NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.

Comments

@qiulaidongfeng
Copy link
Member

Go version

tip

Output of go env in your module/workspace:

no need.

What did you do?

go bug

What did you see happen?

use go env report issue.

What did you expect to see?

use go env -changed report issue.

qiulaidongfeng added a commit to qiulaidongfeng/go that referenced this issue Jun 2, 2024
Fixes golang#67769

Change-Id: I6ac3590cccf98fe7e7a4034f2dd9ca1990996d49
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/589078 mentions this issue: cmd/go: go bug use go env -changed report issue

@ianlancetaylor
Copy link
Contributor

We need more than just the changed variables.

@qiulaidongfeng
Copy link
Member Author

We need more than just the changed variables.

If GOOS GOARCH GOVERSION is needed I have run the go bug on my computer, it contain


$ go version
go version devel go1.23-2f642683 Fri May 17 01:23:00 2024 +0000 windows/amd64

@seankhliao
Copy link
Member

the full set of settings is useful for us to pick out details that the reporter may have omitted themselves.
-changed should only be used when we're unsure where those settings came from.

@seankhliao seankhliao added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. GoCommand cmd/go labels Jun 2, 2024
@matloob
Copy link
Contributor

matloob commented Jun 3, 2024

I don't think we should do this.

@qiulaidongfeng
Copy link
Member Author

the full set of settings is useful for us to pick out details that the reporter may have omitted themselves. -changed should only be used when we're unsure where those settings came from.

If an environment variable does not print in go env -changed, except implementation bug and having a different $GOROOT/go.env or environment variable non have default value, if the other environment variable is not printed, it means that it is now the default value, and can get the same without setting the environment variable on your computer.

@matloob
Copy link
Contributor

matloob commented Jun 11, 2024

It's much easier to follow to just have everything in one place without having to remember the default settings for a specific environment. I don't think the contents of go env are really getting in the way in bug reports.

@seankhliao
Copy link
Member

except implementation bug and having a different $GOROOT/go.env or environment variable non have default value

I think this is too big of a caveat to ignore.
Also, the default value may not be the same for all environments, e.g.
GOMOD, GOWORK will print the resolved values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants