Skip to content

Implement --remap-path-prefix - #48359

Merged
bors merged 1 commit into
rust-lang:masterfrom
jsgf:remap-path-prefix
Mar 1, 2018
Merged

Implement --remap-path-prefix#48359
bors merged 1 commit into
rust-lang:masterfrom
jsgf:remap-path-prefix

Conversation

@jsgf

@jsgfjsgf commented Feb 19, 2018

Copy link
Copy Markdown
Contributor

Remove experimental -Zremap-path-prefix-from/to, and replace it with
the stabilized --remap-path-prefix=from=to variant.

Implementation for #41555

@rust-highfive

Copy link
Copy Markdown
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @petrochenkov (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 19, 2018
Comment threadsrc/librustc/session/config.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The evaluation of components in tuple constructors is probably defined, but I still find this hard to read. And it's probably the wrong order because the iterator starts at the end :) Could you rewrite this to something like:

letmut parts = ...;let to = parts.next();let from = parts.next();match(from, to){ ...}

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Is there anything that implements FromIterator<Item=T> for Option<(T,...)>? I keep ending up in situations where it would be useful (mostly parsing with split), but I suspect it would clash with an existing FromIterator for Option<T> (unless specialization helps?).

@michaelwoerister

Copy link
Copy Markdown
Member

Thanks a lot, @jsgf! The implementation looks good to me, with the bug fixed.

I think we also need to update some documentation, right @rust-lang/docs? There's an entry for the feature in the unstable book. Where should this be moved to?

@jsgf

jsgf commented Feb 20, 2018

Copy link
Copy Markdown
ContributorAuthor

Yes, documentation was my next question.

@jsgfjsgf closed this Feb 20, 2018
@jsgfjsgf reopened this Feb 20, 2018
@jsgf

jsgf commented Feb 20, 2018

Copy link
Copy Markdown
ContributorAuthor

Removed unstable book documentation and updated rustc.1 man page, which seems to be the only place I could find written documentation on command-line options.

@jsgfjsgf changed the title rust: implement --remap-path-prefixImplement --remap-path-prefixFeb 20, 2018
@steveklabnik

Copy link
Copy Markdown
Contributor

Yes, for now that's true. We haven't created a space for rustc docs yet; we wanted to.

@michaelwoerister

Copy link
Copy Markdown
Member

Alright then: @bors r+

Thanks for pushing this over the finish line, @jsgf!

@rust-lang/core, @rust-lang/compiler, @rust-lang/dev-tools: We are stabilizing path prefix remapping!

@bors

bors commented Feb 21, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit ffd8ea7 has been approved by michaelwoerister

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 21, 2018
@michaelwoeristermichaelwoerister added the relnotes Marks issues that should be documented in the release notes of the next release. label Feb 21, 2018
@jsgf

jsgf commented Feb 22, 2018

Copy link
Copy Markdown
ContributorAuthor

Ah, I just found a problem - it looks like having this option on the command line changes the crate hash.

@jsgf

jsgf commented Feb 22, 2018

Copy link
Copy Markdown
ContributorAuthor

Looks like #48019/#48162 is still an issue.

@jsgf

jsgf commented Feb 22, 2018

Copy link
Copy Markdown
ContributorAuthor

Rebasing to master seems to have fixed it, so maybe I just didn't have the other change before.

Remove experimental -Zremap-path-prefix-from/to, and replace it with
the stabilized --remap-path-prefix=from=to variant.
This is an implementation for issue of rust-lang#41555.
@sanxiyn

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Feb 26, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 56a6828 has been approved by sanxiyn

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 28, 2018
bors added a commit that referenced this pull request Feb 28, 2018
Rollup of 10 pull requests
- Successful merges: #48355, #48359, #48380, #48419, #48420, #48461, #48522, #48570, #48572, #48603
- Failed merges:
@bors
bors merged commit 56a6828 into rust-lang:masterMar 1, 2018
@jsgf
jsgf deleted the remap-path-prefix branch March 1, 2018 06:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotesMarks issues that should be documented in the release notes of the next release.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@jsgf@rust-highfive@michaelwoerister@steveklabnik@bors@sanxiyn@petrochenkov