GOEXPERIMENT source code build

239 views
Skip to first unread message

Leah Stapleton

unread,
Aug 16, 2024, 10:28:24 AM8/16/24
to golang-nuts
Hi, 
I have a question about building go source code to run the tests go swiss maps experiments.

first off, 
There are tests with the same name in map_swiss_test.go and map_noswiss_test.go, and when I go test -run TestMapIterOrder, it is by default running the test in map_noswiss_test.go, so I assume I need to build the source code for this experiment.

How do I indicate I want the go source code build to use swiss maps experiment? 

I normally run just run /make.bash from the /src dir. 



Michael Pratt

unread,
Aug 16, 2024, 11:19:17 AM8/16/24
to Leah Stapleton, golang-nuts
You can just set the environment variable, so `GOEXPERIMENT=swissmap go test`.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/4010244f-ebb0-4766-a6a5-d984e3108869n%40googlegroups.com.

Ian Lance Taylor

unread,
Aug 16, 2024, 2:37:00 PM8/16/24
to Leah Stapleton, golang-nuts
Set GOEXPERIMENT=swissmap in the environment when invoking the go
tool. You don't have to run make.bash again.

Ian
Reply all
Reply to author
Forward
0 new messages