From 1e131ea41b87a047acff3b1977d9fece8e25bfff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0tefan=20Baebler?= <319826+stefanb@users.noreply.github.com> Date: Thu, 25 Dec 2025 21:32:49 +0100 Subject: [PATCH] Support Go 1.26 and later with Swiss maps enabled by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In Go 1.26 and later Swiss maps are enabled by default and there is no more GOEXPERIMENT=noswissmap nor GOEXPERIMENT=swissmap flag either. See: * https://github.com/golang/go/commit/2ae059ccaf982c3304fae0b48c1d78ad7192cbdd * https://github.com/golang/go/issues/54766 Signed-off-by: Štefan Baebler <319826+stefanb@users.noreply.github.com> --- go/hack/ensure_swiss_map.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/go/hack/ensure_swiss_map.go b/go/hack/ensure_swiss_map.go index b09bde1121c..f57d1fb3e1a 100644 --- a/go/hack/ensure_swiss_map.go +++ b/go/hack/ensure_swiss_map.go @@ -1,4 +1,4 @@ -//go:build !goexperiment.swissmap +//go:build !goexperiment.swissmap && !go1.26 /* Copyright (c) 2009 The Go Authors. All rights reserved. @@ -32,7 +32,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // This is invalid Go code, and it will fail to compile if you disable // Swiss maps when building Vitess. Our runtime memory accounting system -// expects the map implementation in Go 1.24 to be Swiss. +// expects the map implementation in Go 1.24 and 1.25 to be Swiss. +// In Go 1.26 and later, Swiss maps are always enabled. package hack