Hi Gophers,
The Go team met recently to discuss some notable changes we hope to land in the 1.22 cycle. We talked about risks and downstream work that might be created so that nobody would be surprised. Here’s a brief summary of that discussion. Please keep in mind that these are our best guesses, not commitments. In particular, many features are being implemented in parallel with the proposal process, and might change drastically or even be abandoned altogether if the proposals are declined.
We have a lot of language changes potentially coming up. If you maintain a tool that uses go/types, or otherwise analyzes Go programs, you may have work to do to support 1.22. We suggest you test with tip in a few months, when we hope most changes will have landed in the tree.
Language changes:
Implementation should land behind a GOEXPERIMENT soon. (See proposal.) We expect substantial work to be needed in x/tools/go/ssa, and any tool that analyzes data flow.
Parameterized aliases would be useful for iterators, but haven’t been formally proposed yet. go/types currently has poor support for aliases, which would need to be fixed before this could land. Those changes would most likely create work for tool authors.
We expect this to land soon. We don’t anticipate much impact on tools.
Less error-prone loop variable scoping:
GOEXPERIMENT=loopvar shipped in Go 1.21 and has been the default within Google for some time. For Go 1.22, we plan to enable the new loop scoping based on the go.mod go line. There may be some tool work needed, including x/tools/go/ssa changes, but it should be small.
Compiler and runtime changes:
This is likely to land relatively late in the cycle. As the criteria for inlining changes, code that relies on particular functions being inlined may need adjustments.
PGO improvements:
Work will continue throughout the cycle. We expect it to be an uncomplicated win for PGO users.
Execution tracing:
We want to improve the execution trace format to reduce its runtime overhead and make it more useful. The changes will be internal to the runtime and parser package, with no changes to the user experience planned for this cycle.
Other:
We don’t expect much, if any, impact to tools.
If time permits, we may experiment with a limited set of basic metrics in the Go command for 1.22.
LUCI migration:
We hope to finish our migration to LUCI during the 1.22 cycle. Only Go contributors will be impacted, and we’re working to make the process as smooth as possible.
Thanks,
Heschi on behalf of the Go team