Skip to content

Commit

Permalink
Makefile.defs: Set GODEBUG to gotypesalias=0
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
joamaki authored and sayboras committed Sep 6, 2024
1 parent 5fa9e35 commit 1d9d51f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile.defs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 1d9d51f

Please sign in to comment.