Relink don't rebuild: add a baseline, sound implementation that can be incrementally improved#155871
Open
susitsm wants to merge 12 commits intorust-lang:mainfrom
Open
Relink don't rebuild: add a baseline, sound implementation that can be incrementally improved#155871susitsm wants to merge 12 commits intorust-lang:mainfrom
susitsm wants to merge 12 commits intorust-lang:mainfrom
Conversation
Collaborator
|
Some changes occurred in compiler/rustc_attr_parsing cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_hir/src/attrs cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
Collaborator
|
rustbot has assigned @jdonszelmann. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
… rmeta without parents)
…end on public_api_hash instead of crate_hash
…tributes for testing
…stc_public_hash_unchanged attributes
0e63248 to
4b676bd
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR implemenets a sound but not too useful implementation of relink don't rebuild with the unstable
-Z public-api-hashflag. It currently uses the stable hash of all items in the metadata.The goal is to give a base implementation that can be used for experimentation. It can be incrementally improved over time by removing or stable sorting items. The PR also adds new test attributes
rustc_public_hash_changedandrustc_public_hash_unchangedand an example test using them.What are non-goals for this PR: a useful, optimized implementation of RDR and public api hashing. That has many more challenges which will each require careful review.
A non exhaustive list of the challenges for the feature I ran into while trying to make the hash useful (this should probably go in a tracking issue, but I'm not aware of one)
my_crate::funcprintsprivate functionas the errorcargo check), could use a much simpler hash than codegen, it does not need private types from mir (or any mir at all?)