-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
compiletest: Support --extern options with proc-macro directive
#151258
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
Open
Enselic
wants to merge
1
commit into
rust-lang:main
Choose a base branch
from
Enselic:proc-macro-priv
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+60
−27
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
644786e to
b966c10
Compare
This comment has been minimized.
This comment has been minimized.
So that `pub-priv1.rs` test does not have to (ab)use the aux-crate directive for this purpose. This is very edge-casey so I don't think we should document this in rustc-dev-guide. If someone eneds to do this they will look at the code and easily find the functionality. This is a bit hacky since `--extern priv:pm.rs` is not valid, but we can make our directives work however we want. And I think this is a fine pragmatic balance. Doing it "the right way" would be a lot of work for not much gain. Plus, that work can be done incrementally in small steps in the future.
b966c10 to
af9bd4d
Compare
Collaborator
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
Collaborator
Member
|
I feel like I’m missing a lot of context here. It’s very unclear to me what the new directive syntax is doing, or why. |
Member
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-compiletest
Area: The compiletest test runner
A-testsuite
Area: The testsuite used to check the correctness of rustc
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So that
pub-priv1.rstest does not have to (ab)use theaux-cratedirective for this purpose. Which in turn makes it possible to make//@ no-prefer-dynamicactually not try to link dynamically. See #151257 and the test failure.This is very edge-casey so I don't think we should document this in rustc-dev-guide. If someone needs to do this they will look at the code and easily find the functionality.
This is a bit hacky since
--extern priv:pm.rsis not valid, but we can make our directives work however we want. And I think this is a fine pragmatic balance. Doing it "the right way" would be a lot of work for not much gain. Plus, that work can be done incrementally in small steps in the future if needed and wanted.Unblocks: