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

go/types: unexport the GoVersion configuration option for Go 1.17 #46296

Closed
findleyr opened this issue May 20, 2021 · 7 comments
Closed

go/types: unexport the GoVersion configuration option for Go 1.17 #46296

findleyr opened this issue May 20, 2021 · 7 comments
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@findleyr
Copy link
Contributor

findleyr commented May 20, 2021

+pkg go/types, type Config struct, GoVersion string

The GoVersion field was added to types.Config to configure the language version being type checked.

CC @griesemer

@findleyr findleyr added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels May 20, 2021
@findleyr findleyr added this to the Go1.17 milestone May 20, 2021
@findleyr findleyr self-assigned this May 20, 2021
@ianlancetaylor
Copy link
Contributor

No proposal here either.

@findleyr
Copy link
Contributor Author

This change was ported from types2, where it was needed IIRC to support -lang. It being exported was incidental, and for that reason in particular perhaps we should unexport this field and discuss it for 1.18. @griesemer, what do you think?

@griesemer
Copy link
Contributor

Some features (and thus error messages) depend on the Go version. As long as we're ok with go/types running against the latest language version we don't need to expose this.

@findleyr
Copy link
Contributor Author

Some features (and thus error messages) depend on the Go version. As long as we're ok with go/types running against the latest language version we don't need to expose this.

To clarify, I think this is a useful feature, and we should expose it eventually. But the fact that it was exposed in go/types for 1.17 was incidental. The real reason it was added was for consistency with types2 (and because it has value of course). At the time we weren't thinking about 1.17.

If we think it's minor enough not to require a proposal, we can leave it in, but I certainly don't want it to be perceived as bypassing the proposal process. Since no one is clamoring for this change, unexporting the field and making a brief proposal at the start of the 1.18 cycle seems like a fine option. I feel roughly the same about #46298, though I think that change is even more minor.

I defer to both of you, as members of the proposal committee, for what is OK.

@griesemer
Copy link
Contributor

Sorry for not being clear: What I meant is that we don't need to expose this for Go1.17. We can discuss what needs to be done for Go1.18.

@findleyr findleyr changed the title doc/go1.17: document go/types changes for Go 1.17 go/types: unexport the GoVersion configuration option for Go 1.17 May 28, 2021
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/323430 mentions this issue: go/types: unexport the GoVersion configuration option for Go 1.17

@findleyr
Copy link
Contributor Author

findleyr commented Jun 8, 2021

Filed a proposal at #46648 to discuss this feature for 1.18.

@golang golang locked and limited conversation to collaborators Jun 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants