Skip to content

[3844] Use rootpath for wrapper root for determinism - #3845

Merged
illicitonion merged 3 commits into
bazelbuild:mainfrom
finn-ball:finn/wrapper-determinism
Feb 6, 2026
Merged

[3844] Use rootpath for wrapper root for determinism#3845
illicitonion merged 3 commits into
bazelbuild:mainfrom
finn-ball:finn/wrapper-determinism

Conversation

@finn-ball

@finn-ball finn-ball commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #3844

Uses a relative path instead of absolute:

WRAPPED_TOOL_EXECPATH: ../+rust+rust_linux_x86_64__x86_64-unknown-linux-gnu__stable_tools/rust_toolchain/bin/cargo

Comment thread tools/upstream_wrapper/BUILD.bazel Outdated
edition = "2018",
rustc_env = {
"WRAPPED_TOOL_EXECPATH": "$(execpath {})".format(target),
"WRAPPED_TOOL_EXECPATH": "$(rootpath {})".format(target),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the variable (here and in main.rs) also be changed? It looks like this is just a fallback for finding the binary when runfiles fails.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially this "fix" could break cross compilation potentially if the target is different to the execution host?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open to ideas on other fixes

@illicitonion
illicitonion force-pushed the finn/wrapper-determinism branch from 5c99129 to f08b1da Compare February 6, 2026 18:14

@illicitonion illicitonion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me, thanks!

@illicitonion
illicitonion added this pull request to the merge queue Feb 6, 2026
Merged via the queue into bazelbuild:main with commit 52feb40 Feb 6, 2026
3 checks passed
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.

rust wrappers are non-deterministic

3 participants