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

Removing absolute path in proc-macro #121842

Closed
wants to merge 1 commit into from

Conversation

sundeep-kokkonda
Copy link
Contributor

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.

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.
@rustbot
Copy link
Collaborator

rustbot commented Mar 1, 2024

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 (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 1, 2024
@@ -907,7 +907,7 @@ impl Session {
| CrateType::Rlib
| CrateType::Staticlib
| CrateType::Cdylib => continue,
CrateType::ProcMacro => return false,
CrateType::ProcMacro => return true,
Copy link
Member

@Urgau Urgau Mar 1, 2024

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

@sundeep-kokkonda sundeep-kokkonda changed the title Removing absolute path in '.rustc' section Removing absolute path in proc-macro Mar 3, 2024
@bors
Copy link
Contributor

bors commented Mar 6, 2024

☔ The latest upstream changes (presumably #122111) made this pull request unmergeable. Please resolve the merge conflicts.

@TaKO8Ki
Copy link
Member

TaKO8Ki commented Mar 7, 2024

@sundeep-kokkonda Sorry for the late review. Could you resolve a conflict? After that, r=me

@sundeep-kokkonda
Copy link
Contributor Author

@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.

@workingjubilee
Copy link
Member

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants