Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround Rust 1.49 breaking macOS processes with a materialized argv0 #11452

Merged
merged 3 commits into from
Jan 13, 2021

Conversation

Eric-Arellano
Copy link
Contributor

Works around #11406, which we found is due to rust-lang/rust#80819.

To workaround, we absolutify relative paths when they are argv[0]. We only do this for local execution.

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
Copy link
Contributor Author

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Thank you @tdyas for figuring this out! I can now run ./pants test and ./pants count-loc on mac silicon!

src/rust/engine/process_execution/src/local.rs Outdated Show resolved Hide resolved
Eric-Arellano added a commit that referenced this pull request Jan 13, 2021
From the Remote Execution API:

https://github.com/bazelbuild/remote-apis/blob/9e72daff42c941baaf43a4c370e2607a984c58a7/build/bazel/remote/execution/v2/remote_execution.proto#L472-L475

> The first argument must be the path to the executable, which must be either a relative path, in which case it is evaluated with respect to the input root, or an absolute path.

These tests were causing #11452 to fail because the unconstrained `python` looked like a relative path even though it isn't.

[ci skip-build-wheels]
[ci skip-rust]
# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@Eric-Arellano Eric-Arellano merged commit 24c57c0 into pantsbuild:master Jan 13, 2021
@Eric-Arellano Eric-Arellano deleted the fix-relpath-darwin branch January 13, 2021 01:52
Eric-Arellano added a commit that referenced this pull request Jan 13, 2021
This is necessary to compile the engine on Mac Silicon.

We can now safely upgrade thanks to #11452 fixing the issue with macOS.
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.

3 participants