-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Tracking issue for Path Prefix Remapping #41555
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
What's the next step to stabilize this? Looks like it probably won't be stable for 1.20? |
Good question. I did not heard any complaints about the way things currently work -- which I interpret as everybody being happy Some of the people initially interested in the feature were @jmesmon, @infinity0, @sanxiyn, and @jsgf. Do you have any feedback? Other than that, two open topics are:
I personally would be fine with either of the first two options. cc @rust-lang/dev-tools |
I haven't tested this yet but I'm still interested. When I get a chance, I'll test it with 1.19 in Debian and see if we get a reproducible build. |
We use it in clippy for making our tests' stderr output OS independent. Works like a charm: https://github.com/Manishearth/rust-clippy/blob/master/tests/examples.rs#L29 |
Is the duplication of the path with |
Maybe it changed. But I had to implement it this way, otherwise it wouldn't work |
The current implementation works on plain strings. It does not try to interpret them as paths. |
Oh right. I was going by the code at the bottom of this older comment, I didn't notice you had gone back to plain string matching. What was the reason? I know GCC also do plain string matching, but I actually prefer path-level matching because it would be easier to use. This cross-platform duplication issue is a further example in that area. |
@brson, @michaelwoerister I just hacked it up in buck and it all looks good. Once it's stable (at least, we have decided on a stable command line option), I can do a real diff. Either |
@michaelwoerister Do you think it's possible to stabilize this in the 1.21 timeframe? |
@infinity0 I'm divided on whether path matching should be string- or component-based. Component-based is a bit more ergonomic in the cross-platform case. I'm not sure though if it can be somewhat less predictable in corner cases (e.g. strange Windows path prefixes). @jsgf That should be doable. I'm nominating this for the next @rust-lang/dev-tools meeting to discuss string matching and which form the CLI should take -- and then we can let the appropriate subteams vote on it. @rust-lang/core: Which teams need to sign off on stabilizing this? Quick recap: This feature allows to remap file paths (in output messages and output artifacts) to be remapped. This is necessary for reproducible builds and helps with custom debugging setups. |
@michaelwoerister @rust-lang/dev-tools sounds good to me as a team for signing off! |
On matching mechanism: an alternate to paths & strings is to use regexes. Strings works fine for me though. |
This has been discussed in the @rust-lang/dev-tools meeting and the conclusion was that we want to stabilize in the following form:
@rfcbot fcp merge |
Team member @michaelwoerister has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
@rfcbot reviewed |
So in other words you would split on the final |
What's the current status of this? It looks like it's been approved for stabilization, but the plan is to change the option to a single |
I've been using the |
Yes, it's just waiting to be implemented. I've just been busy with other things. I'm glad to take PRs though. |
OK, I'm looking at it now. |
As a minor note, it would be interesting to have both $HOME and $PWD remapped to standard values for release builds. This is currently the only thing that I have to adjust manually for reproducible builds (besides #47135). |
They would only affect the build if you're explicitly referencing them with |
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.
@jsgf the binary includes my I think my project root and my explicit or implicit cargo home should be remapped. |
@kpcyrd Well I guess that's an issue to be addressed in |
@jsgf you're right, I've opened an issue for that: rust-lang/cargo#5505 |
Closing as this was stabilised in 1.26.0 and there doesn't seem to be any leftover features to be implemented. |
Before the flag was stabilized, it required two arguments of the form "from=<from_path>" and "to=<to_path>" respectively. The stabilized version uses one argument of the form "<from_path>=<to_path>". Unfortunately the old format is still parsed successfully, but results in attempting to replace the literal paths "from" and "to". rust-lang/rust#41555 (comment)
This feature was originally requested in #38322. The PR that implements this in its unstable form is #41508. This will eventually become stable if the testing phase goes well.
The text was updated successfully, but these errors were encountered: