From 2257942442cefaf7bbb880d93a9b382a1e9fbd82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0tefan=20Baebler?= <319826+stefanb@users.noreply.github.com> Date: Tue, 13 Jan 2026 20:16:44 +0100 Subject: [PATCH] Support Go 1.26 and later with Swiss maps always enabled (#19088) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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