The main package cmd/gotext needs to be updated to set gotypesalias=1 GODEBUG value by default when built by a toolchains >= 1.24. Otherwise it will not be able to type check inputs with type parameterized aliases (1.24). This can be done by conditionally setting the variable (see https://go.dev/cl/627715 for an example). Or updated the go.mod to go language setting to >= 1.23.
golang.org/x/text/message/pipeline
may need to by updated to support go/types.Alias being produced by the type checker. Given that this calls go/types.Underlying()
, it likely needs to be updated. Alternatively this could be audited by an expert on the package to determine if this is not necessary.
See #69772 for additional context.
CC @mpvl
Comment From: gabyhelp
Related Issues
- golang.org/x/example/gotypes: update for go/types.Alias #70696
- x/tools/gopls: handle go1.22's go/types.Alias #64581 (closed)
- all: audit x/ repos for gotypesalias settings #69772
- go/types, x/tools: help tool authors support the new go/types.Alias node #67263
- golang.org/x/exp/apidiff: support for go/types.Alias #70695
- x/tools: get tests passing with GODEBUG=gotypesalias=1 #65294 (closed)
- x/build: add tip builders with GOEXPERIMENT=aliastypeparams=1 for at least go and x/tools repo #69121 (closed)
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)