From ba142f8e7d3c04ffd3a1c19500840f7be8bb742b Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Sat, 15 Feb 2025 18:44:12 -0500 Subject: [PATCH] bind: pin go/types to not produce types.Alias types Bind currently targets the earlier go/types semantics (gotypesalias=0), and needs to be updated to be compatible with the new (gotypesalias=1). This is the only way in which the module isn't compatible with Go 1.23 language semantics, so add an explicit godebug line for it with a TODO. This unblocks moving the module to Go 1.23 (as done in the next CL). For golang/go#70698. Change-Id: I59a61defdcf327aed9ccd67b123b1516cd118d9e Reviewed-on: https://go-review.googlesource.com/c/mobile/+/649381 LUCI-TryBot-Result: Go LUCI Reviewed-by: Hajime Hoshi Auto-Submit: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov Reviewed-by: Michael Knyszek --- go.mod | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/go.mod b/go.mod index ff1959a..db1d25b 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,19 @@ module golang.org/x/mobile go 1.22.0 +// The modern go/types type checker produces types.Alias +// types for the explicit representation of type aliases. +// (Initial opt-in support for it was added in Go 1.22, +// and it became the default behavior in Go 1.23.) +// +// TODO(go.dev/issue/70698): Update the golang.org/x/mobile/bind +// code generator for the new behavior and delete this temporary¹ +// forced pre-1.23 go/types behavior. +// +// ¹ It's temporary because this godebug setting will be removed +// in a future Go release. +godebug gotypesalias=0 + require ( golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63 golang.org/x/image v0.24.0