Skip to content

fix: remove obsolete noswissmap GOEXPERIMENT override - #4

Open
ping-ke wants to merge 1 commit into
masterfrom
fix-gobuild
Open

fix: remove obsolete noswissmap GOEXPERIMENT override#4
ping-ke wants to merge 1 commit into
masterfrom
fix-gobuild

Conversation

@ping-ke

@ping-ke ping-ke commented Sep 6, 2026

Copy link
Copy Markdown

Summary

Remove the unconditional GOEXPERIMENT=noswissmap override from the Go build and test workflow.

Problem

The project declares Go 1.21 compatibility, but its build scripts always set:

GOEXPERIMENT=noswissmap

Go versions that do not recognize the swissmap experiment fail before building:

go: unknown GOEXPERIMENT swissmap
make: *** [Makefile:19: build/.built] Error 2

The override was added as a temporary workaround for a Go 1.24 conflict involving an external dependency. That dependency has since been removed, so the workaround is no longer needed.

Changes

  • Remove the global GOEXPERIMENT=noswissmap export from Makefile.
  • Run go build and go vet normally from build.sh.
  • Run go test normally from the Makefile and test runner.

Behavior Changes

Go build and test commands now use the selected Go toolchain's default experiment settings. This restores compatibility with the Go version declared in go.mod and avoids the unknown GOEXPERIMENT swissmap failure.

No Go source code, dependencies, or public APIs are changed.

Validation

make rebuild 
make test-all

@qzhodl

qzhodl commented Sep 7, 2026

Copy link
Copy Markdown

Does this mean that before this change, make rebuild would fail with newer Go versions, such as Go 1.24 or later? I’m wondering why I didn’t run into this issue on my side before.

@ping-ke

ping-ke commented Sep 8, 2026

Copy link
Copy Markdown
Author

Does this mean that before this change, make rebuild would fail with newer Go versions, such as Go 1.24 or later? I’m wondering why I didn’t run into this issue on my side before.

Not exactly. GOEXPERIMENT=noswissmap was introduced in Go 1.24 and is supported in Go 1.24 and 1.25, but it was removed in later Go versions.

Since Ethash supports Go 1.21+, adding this flag causes builds with Go 1.21–1.23 to fail because noswissmap is not recognized in those versions. It also causes builds with Go 1.26+ to fail because the experiment has been removed.

So GOEXPERIMENT=noswissmap is only valid for Go 1.24 and 1.25.

This is probably why the issue wasn't noticed before: it depends on which Go version was being used. Go 1.24 and 1.25 work with the flag, while Go 1.21–1.23 and Go 1.26+ do not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants