You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This shell scrip was used to create a WASM binary that a test relies on.
I attempted to ensure that all the environment variables are identical so that the build is reproducible, but the WASM binaries differ. This discrepancy causes CI to fail because it detects the file as not being generated in the PR.
We need the build to be reproducible so we can use the hash as an identifier for the WASM binaries. I noticed that GOGCCFLAGS differs between my machine and the CI machine, but since CGO_ENABLED=0 and it’s WASM, I expected that to be irrelevant. I also tried setting the variable directly, but go env didn’t show it respecting the flags.
I’ve attached the output from go env on both my machine and the CI machine, as captured by the shell script.
When make generate is run in the PR, causing go generate to run the shell script, the produced binary is different than the one generated on my local machine. I've also had others attempt to generate the WASM, but theirs was different again.
What did you expect to see?
A reproducible build.
The text was updated successfully, but these errors were encountered:
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
Go version
go1.22.7 WASM build not reproducible
Output of
go env
in your module/workspace:What did you do?
This shell scrip was used to create a WASM binary that a test relies on.
I attempted to ensure that all the environment variables are identical so that the build is reproducible, but the WASM binaries differ. This discrepancy causes CI to fail because it detects the file as not being generated in the PR.
We need the build to be reproducible so we can use the hash as an identifier for the WASM binaries. I noticed that GOGCCFLAGS differs between my machine and the CI machine, but since CGO_ENABLED=0 and it’s WASM, I expected that to be irrelevant. I also tried setting the variable directly, but go env didn’t show it respecting the flags.
I’ve attached the output from go env on both my machine and the CI machine, as captured by the shell script.
Note: I’ve redacted my name from my go env.
env.mine.txt
env.pr.txt
What did you see happen?
When make generate is run in the PR, causing go generate to run the shell script, the produced binary is different than the one generated on my local machine. I've also had others attempt to generate the WASM, but theirs was different again.
What did you expect to see?
A reproducible build.
The text was updated successfully, but these errors were encountered: