-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Removing absolute path in proc-macro #121842
Conversation
With rust 1.75 the absolute build path is embedding into '.rustc' section and which causes reproducibility issues. Detailed issue is here. rust-lang#120825 (comment) With this change the 'absolute path' changed back to '/rust/$hash' format.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @TaKO8Ki (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
@@ -907,7 +907,7 @@ impl Session { | |||
| CrateType::Rlib | |||
| CrateType::Staticlib | |||
| CrateType::Cdylib => continue, | |||
CrateType::ProcMacro => return false, | |||
CrateType::ProcMacro => return true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I guess this answer the ambiguity in RFC 3127 trim-paths about what to do with proc-macros.
However, I don't think this is the right fix, this would now always remap paths and not take into account -Zremap-path-scope
, we should instead remove the loop.
- // bail out, if any of the requested crate types aren't:
- // "compiled executables or libraries"
- for crate_type in &self.opts.crate_types {
- match crate_type {
- CrateType::Executable
- | CrateType::Dylib
- | CrateType::Rlib
- | CrateType::Staticlib
- | CrateType::Cdylib => continue,
- CrateType::ProcMacro => return false,
- }
- }
Btw, this PR title is a bit misleading, it's about all paths in a proc-macro not just .rustc
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed 'PR' subject, and tried a build by removing the 'loop' and build is success. Will you pull this change / I should do anything else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great.
Will you pull this change / I should do anything else?
Just push a new commit removing the loop.
☔ The latest upstream changes (presumably #122111) made this pull request unmergeable. Please resolve the merge conflicts. |
@sundeep-kokkonda Sorry for the late review. Could you resolve a conflict? After that, r=me |
I can see my changes are merged with #121959 . This is old commit before review corrections. |
@sundeep-kokkonda Not sure where things stand here based on your remark. Could you rebase this if it needs to be rebased, or close it if it needs to be closed? Thanks! |
With rust 1.75 the absolute build path is embedding into '.rustc' section and which causes reproducibility issues. Detailed issue is here. #120825 (comment)
With this change the 'absolute path' changed back to '/rust/$hash' format.