-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Mark .overrides from marked methods in a copy assembly #82197
Conversation
Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @sbomer, @joperezr Issue DetailsFixes #81746 Static abstract interface methods that aren't used are expected to be removed, and any references to them in the metadata of the overriders are expected to be removed in SweepStep. However, overrides may come from a 'copy' assembly, so their metadata won't get swept at all. We would still remove the static abstract method, but would leave the reference to it in the overrider's metadata, creating invalid metadata. This fixes the issue by making sure all methods referenced in the .overrides metadata of method X are marked if method X is in a copy assembly, where previously we would postpone marking the .overrides if the base was static abstract.
|
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.
LGTM, thanks a lot!
Static abstract interface methods that aren't used are expected to be removed, and any references to them in the metadata of the overriders are expected to be removed in SweepStep. However, overrides may come from a 'copy' assembly, so their metadata won't get swept at all. We would still remove the static abstract method, but would leave the reference to it in the overrider's metadata, creating invalid metadata. This fixes the issue by making sure all methods referenced in the .overrides metadata of method X are marked if method X is in a copy assembly, where previously we would postpone marking the .overrides if the base was static abstract.
Fixes #81746
Static abstract interface methods that aren't used are expected to be removed, and any references to them in the metadata of the overriders are expected to be removed in SweepStep. However, overrides may come from a 'copy' assembly, so their metadata won't get swept at all. We would still remove the static abstract method, but would leave the reference to it in the overrider's metadata, creating invalid metadata.
This fixes the issue by making sure all methods referenced in the .overrides metadata of method X are marked if method X is in a copy assembly, where previously we would postpone marking the .overrides if the base was static abstract.