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

Add fn args_replace and fn get_program to ProcessBuilder #4424

Merged
merged 1 commit into from Aug 22, 2017

Conversation

Xanewok
Copy link
Member

@Xanewok Xanewok commented Aug 22, 2017

Executor::exec() provides a ProcessBuilder argument representing compiler call and if someone wants to use it or modify it for their own purposes, they have to (partially) recreate it themselves.

This:

  • makes the argument modification possible (via args_replace, analogous to env_remove)
  • exposes the program that will be run (via get_program, in case rustc is overriden via wrapper etc.).

r? @alexcrichton

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Collaborator

bors commented Aug 22, 2017

📌 Commit c48e6da has been approved by alexcrichton

@bors
Copy link
Collaborator

bors commented Aug 22, 2017

⌛ Testing commit c48e6da with merge f46d485...

bors added a commit that referenced this pull request Aug 22, 2017
Add `fn args_replace` and `fn get_program` to `ProcessBuilder`

`Executor::exec()` provides a `ProcessBuilder` argument representing compiler call and if someone wants to use it or modify it for their own purposes, they have to (partially) recreate it themselves.

This:
* makes the argument modification possible (via `args_replace`, analogous to `env_remove`)
* exposes the program that will be run (via `get_program`, in case `rustc` is overriden via wrapper etc.).

r? @alexcrichton
@Xanewok
Copy link
Member Author

Xanewok commented Aug 22, 2017

That's fast, thanks! 🎉

@bors
Copy link
Collaborator

bors commented Aug 22, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing f46d485 to master...

@bors bors merged commit c48e6da into rust-lang:master Aug 22, 2017
bors added a commit that referenced this pull request Aug 28, 2017
Allow to substitute executed program in `ProcessBuilder`

Extends #4424. Sorry for the noise, turns out it'd also be useful to substite the executed program (e.g. for rls, which needs to use a rustc shim itself) without having to copy over manually all parts of the `ProcessBuilder`.

While I'm at it, do you think this needs even more functionality, like being able to specify `None` for the `cwd` or `jobserver` (currently API exposes only ability to specify `Some(...)` as values for those)?

r? @alexcrichton
@ehuss ehuss added this to the 1.21.0 milestone Feb 6, 2022
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.

None yet

4 participants