Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 1 addition & 4 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ##################"