From d2ce6467c942d4f21563d86c2b44456d6efc79ff Mon Sep 17 00:00:00 2001 From: ping-ke Date: Sat, 5 Sep 2026 17:45:30 +0800 Subject: [PATCH] remove GOEXPERIMENT --- Makefile | 6 +----- build.sh | 6 ++---- test/test.sh | 5 +---- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index f749649..b673c87 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,5 @@ .PHONY: all build rebuild build-bench test-all test-c test-python test-go bench bench-light bench-full clean -# GOEXPERIMENT=noswissmap: workaround for Go 1.24 CGo+Swiss-map runtime -# redeclaration bug (map.go vs linkname_swiss.go conflict). -export GOEXPERIMENT=noswissmap - BUILD_DIR := build TEST_BIN := $(BUILD_DIR)/test/c/Test BENCH_LIGHT := $(BUILD_DIR)/src/benchmark/Benchmark_LIGHT @@ -37,7 +33,7 @@ test-python: ./test/python/test.sh test-go: $(BUILD_DIR)/.built - GOEXPERIMENT=noswissmap go test -timeout 9999s + go test -timeout 9999s test-all: $(BUILD_DIR)/.built ./test/test.sh diff --git a/build.sh b/build.sh index 22ef5eb..c31941a 100755 --- a/build.sh +++ b/build.sh @@ -62,15 +62,13 @@ cd "$REPO_ROOT" if [ ! -f go.mod ]; then echo "[build/go] go.mod not found, skipping Go build" else - # GOEXPERIMENT=noswissmap: workaround for Go 1.24 CGo + Swiss-map - # runtime redeclaration bug (map.go vs linkname_swiss.go conflict). echo "[build/go] Building Go package..." - GOEXPERIMENT=noswissmap go build ./... + go build ./... echo "[build/go] Done" # Verify the package compiles cleanly with vet as well echo "[build/go] Running go vet..." - GOEXPERIMENT=noswissmap go vet ./... + go vet ./... echo "[build/go] vet passed" fi diff --git a/test/test.sh b/test/test.sh index d5c6340..abe5dc5 100755 --- a/test/test.sh +++ b/test/test.sh @@ -33,9 +33,6 @@ echo -e "\n################# Testing Python ##################" echo -e "\n################# Testing Go ##################" cd "$REPO_ROOT" -# GOEXPERIMENT=noswissmap: Go 1.24 has a CGo+Swiss-map bug where map.go and -# linkname_swiss.go both get compiled, causing "redeclared" runtime errors. -# Disabling Swiss maps avoids the conflict until the Go toolchain is fixed. -GOEXPERIMENT=noswissmap go test -timeout 9999s +go test -timeout 9999s echo -e "\n################# All tests passed ##################"