Skip to content

Conversation

LorrensP-2158466
Copy link
Contributor

@LorrensP-2158466 LorrensP-2158466 commented Sep 30, 2025

Add a test based on the discussion here and related to #145575 (comment).

This is the most reduced form I could create that passes on nightly but fails with #145108 (see #gsoc > Project: Parallel Macro Expansion @ 💬).

Also not sure about the test names.

r? @petrochenkov

@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 Sep 30, 2025
@petrochenkov
Copy link
Contributor

This is the most reduced form I could create that passes on nightly

I mostly wanted a version of the same issue that fails on nightly, but having both would be even better.

@LorrensP-2158466
Copy link
Contributor Author

LorrensP-2158466 commented Sep 30, 2025

Added a revision that uses the version where the glob import is inserted by a macro. I have confirmed this fails when using cargo +stage1 check on my own crates, but for some reason, this is not working in ui tests. I'm probably doing something wrong, but I can't figure it out from the docs.

@rust-log-analyzer

This comment has been minimized.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 1, 2025
@LorrensP-2158466
Copy link
Contributor Author

@rustbot ready

I'm still confused why the nightly-fail doesn't fail in the tests but fails when I extract them into their own separate crates and compile them myself.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 1, 2025
@rust-log-analyzer

This comment has been minimized.

@petrochenkov
Copy link
Contributor

@rustbot ready

I'm still confused why the nightly-fail doesn't fail in the tests but fails when I extract them into their own separate crates and compile them myself.

Need to figure this out, split the test if necessary.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 1, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 1, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@petrochenkov
Copy link
Contributor

petrochenkov commented Oct 1, 2025

Default edition may be different in ui tests (2015) and your local setup, it affects import resolution.

@LorrensP-2158466 LorrensP-2158466 force-pushed the same-res-ambiguity-test branch from 99de60b to 0b84290 Compare October 1, 2025 13:39
@LorrensP-2158466
Copy link
Contributor Author

LorrensP-2158466 commented Oct 1, 2025

Ah, right, editions. I set them up correctly based on the output I get on my local setup with cargo +stage1 build -v. Both crates are compiled with edition 2018, and the pulling crate in 2024. The error is still different, with it now reporting that the macro is private instead of not accessible in the scope.

The only difference I see is that ambiguous_extern is passed as a dylib in the tests and as a .rmeta file in my local setup. I have been trying to understand how to change this, but i have not made any progress.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 1, 2025
@rust-log-analyzer

This comment has been minimized.

@petrochenkov
Copy link
Contributor

petrochenkov commented Oct 1, 2025

The error is still different, with it now reporting that the macro is private instead of not accessible in the scope.

This version is even better, the issue can be seen more directly.

The only difference I see is that ambiguous_extern is passed as a dylib in the tests and as a .rmeta file in my local setup.

This is not important.

r=me with green CI (stderr files need to be updated) and after squashing commits.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 1, 2025
@LorrensP-2158466 LorrensP-2158466 force-pushed the same-res-ambiguity-test branch from ffb7027 to a7eed08 Compare October 1, 2025 16:40
@LorrensP-2158466
Copy link
Contributor Author

This version is even better, the issue can be seen more directly.

Nice!

r=me with green CI (stderr files need to be updated) and after squashing commits.

You'll have to r+ this :), I don't have those privileges. @rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 1, 2025
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.

4 participants