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

Simplify ProcessBuilder to be closer to Command #238

Closed
wants to merge 3 commits into from

Conversation

alexcrichton
Copy link
Member

At the same time, remove a bunch of path.display().to_string() and friends.

This changes many bounds to ToCStr to stay in line with the since-introduced
Command structure. The builder remains separate of command to have control over
executing and Show.

Path-related methods have been removed and env-initialization/management are
left to Command, ProcessBuilder only keeps track of the delta.
Unfortunately this cannot yet have a test for it as rustc itself does not work
if it is run on non-utf8 paths.
base.args(plugin_args.as_slice())],
Target => vec![target],
Plugin => vec![plugin],
PluginAndTarget if cx.config.target().is_none() => vec![target],
Copy link
Member

Choose a reason for hiding this comment

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

Is really meant to be target().is_none() => target? It seems to me that target being none would imply that this should be vec![plugin]?

Copy link
Member Author

Choose a reason for hiding this comment

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

If cx.config.target() is none then the target/plugin commands end up being the same thing, so one can be discarded (no need to compile twice).

@alexcrichton alexcrichton mentioned this pull request Jul 22, 2014
bors added a commit that referenced this pull request Jul 22, 2014
At the same time, remove a bunch of `path.display().to_string()` and friends.
@bors bors closed this Jul 22, 2014
bors added a commit that referenced this pull request Jul 22, 2014
This command is used to create a new cargo repository at a destination that
previously does not exist. A separate command, cargo-init, will be implemented
to initialize an already-existing repository.

cc #21

This is currently rebased on #238
@alexcrichton alexcrichton deleted the cstr-builder branch August 1, 2014 16:53
bors added a commit to alexcrichton/cargo that referenced this pull request Sep 2, 2014
At the same time, remove a bunch of `path.display().to_string()` and friends.
bors added a commit to alexcrichton/cargo that referenced this pull request Sep 2, 2014
This command is used to create a new cargo repository at a destination that
previously does not exist. A separate command, cargo-init, will be implemented
to initialize an already-existing repository.

cc rust-lang#21

This is currently rebased on rust-lang#238
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.

4 participants