Add fn args_replace and fn get_program to ProcessBuilder#4424
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 22, 2017
Merged
Add fn args_replace and fn get_program to ProcessBuilder#4424bors merged 1 commit intorust-lang:masterfrom
fn args_replace and fn get_program to ProcessBuilder#4424bors merged 1 commit intorust-lang:masterfrom
Conversation
Member
|
@bors: r+ |
Contributor
|
📌 Commit c48e6da has been approved by |
Contributor
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
Contributor
Author
|
That's fast, thanks! 🎉 |
Contributor
|
☀️ Test successful - status-appveyor, status-travis |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Executor::exec()provides aProcessBuilderargument 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:
args_replace, analogous toenv_remove)get_program, in caserustcis overriden via wrapper etc.).r? @alexcrichton