From 1d9d51f40f3e9ef5d82ec03f8f5a92e2a2697f5d Mon Sep 17 00:00:00 2001 From: Jussi Maki Date: Fri, 6 Sep 2024 12:36:57 +0200 Subject: [PATCH] Makefile.defs: Set GODEBUG to gotypesalias=0 In Go v1.23 gotypesalias is set to 1, which changes the parsing of type aliases. This breaks our "generate-k8s-api" as k8s.io/gengo does not yet handle the new semantics. Work around this issue by setting gotypesalias=0 until the kubernetes tooling has fixed the issue. Signed-off-by: Jussi Maki --- Makefile.defs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.defs b/Makefile.defs index 4239262f7ce6a..bdf05a83a7844 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -84,6 +84,11 @@ GO_BUILD_LDFLAGS ?= # go build/test -tags values GO_TAGS_FLAGS += osusergo +# Keep the Go <=1.22 semantics for parsing type aliases. +# This is needed for code generation (k8s protobuf, deep*) until 'gengo' has been fixed. +GODEBUG += gotypesalias=0 +export GODEBUG + # This is declared here as it is needed to change the covermode depending on if # RACE is specified. GOTEST_COVER_OPTS =