From 0481857dd011252284b990e4ed2519dd6906b181 Mon Sep 17 00:00:00 2001 From: Tim King Date: Wed, 13 Nov 2024 13:38:41 -0800 Subject: [PATCH] cmd/govulncheck: set gotypesalias=1 when using >=1.23 toolchain Set gotypesalias=1 when using >=1.23 toolchain on all of the main packages in x/tools that use go/types. This effectively upgrades commit https://go.dev/cl/617095. For golang/go#69772 Change-Id: I9f3e64d348f6bffc75321a08145fde07fb4024a6 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/627715 LUCI-TryBot-Result: Go LUCI Reviewed-by: Zvonimir Pavlinovic --- cmd/govulncheck/gotypesalias.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 cmd/govulncheck/gotypesalias.go diff --git a/cmd/govulncheck/gotypesalias.go b/cmd/govulncheck/gotypesalias.go new file mode 100644 index 00000000..288c10c2 --- /dev/null +++ b/cmd/govulncheck/gotypesalias.go @@ -0,0 +1,12 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build go1.23 + +//go:debug gotypesalias=1 + +package main + +// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). +// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1).