Added determinism inspection workflow
This change adds a github workflow that generates a report of whether or not rules_rust is deterministic on a particular platform.
How it works:
The workflow checks out main of rules_rust and builds //... back to back from two different directories. Each output within the output_user_root directory is hashed for each checkout and compared. Any hash which is not identical indicates a non-deterministic output.
The workflow is currently configured to run on Linux, MacOS, and Windows.
The windows side of this is running into https://github.com/bazelbuild/bazel/issues/19710
And I ended up needing to switch the --output_user_root from D:/r to C:/r
Results show targets are not deterministic 😞
this is something we’ll have to fix over time
https://github.com/bazelbuild/rules_rust/actions/runs/14020126362
@UebelAndre I'm very interested in this. I have a need for determinism, are you using incremental=false? I have a vague recollection that reproducible builds generally require that the build not be incremental. To clarify, that's just about making the per-crate builds not be incremental, it shouldn't do any harm to the bazel build graph incrementality.
@UebelAndre I'm very interested in this. I have a need for determinism, are you using
incremental=false? I have a vague recollection that reproducible builds generally require that the build not be incremental. To clarify, that's just about making the per-crate builds not be incremental, it shouldn't do any harm to the bazel build graph incrementality.
Does incremental=false (the cargo setting?) actually have any impact here? Actions will be run in a sandbox and thus would never be incremental, right?