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.
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
Experimental: Add Derive Proc-Macro Caching #129102
base: master
Are you sure you want to change the base?
Experimental: Add Derive Proc-Macro Caching #129102
Changes from 1 commit
3db813e
2507253
0733fbd
a4b675c
209fd8a
fe36059
eb99b01
fc3bc29
075853d
7a1b2f5
d781c4b
a81aaed
91c0d1b
8521154
17dcadf
35beb09
382c5d0
b71c42d
a359e3c
f768697
bb3bddf
77944c9
de0fad9
d6c2527
00cff94
abcc4a2
e93beac
cd82e38
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Not sure why do you want to test stderr output, incremental tests have directives for testing invalidation.
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.
Yep, that's what the "Properly have the test check this, but how?" was for, I simply didn't see how I can check this. There are directives, but I didn't figure out a way to make them work for this case. Because the directive needs to be attached to the proc macro output I think, but that was weird somehow. I will try again and see what exactly the problem was with that.
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.
Tried again, but couldn't figure out something that works, i.e., that succeeds with proc-macro caching enabled, but fails with proc-macro caching disabled.
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 suspect that the
#[rustc_clean]
attribute needs to be used instead of#[rustc_partition_codegened]
because the incremental system eventually figures out that the second run ofderive(Nothing)
effectively produced the same data as the first one, so the codegen doesn't need to happen again.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.
Also, run-make tests (
tests/run-make
) allow to run the compiler twice and look at stderr.There are even some examples of running the compiler in incremental mode there (search by "incremental").