-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Only warn on duplicate members within a single descriptors file #101574
Only warn on duplicate members within a single descriptors file #101574
Conversation
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas |
This looks good, but I always wondered why we need to warn. Could this warn in legitimate situations, like embedded descriptors in two different XML files preserving the same thing, or even within the same descriptor if the preservations are under different feature flags and we happen to enable both feature flags at the same time, leading to both being used? |
This shouldn't warn on the same member being marked in different embedded XML files, a new object is created for each descriptor file with a new I'm fine removing the warnings, I don't see a lot of value in them. |
Looks like it was introduced as a convenience to help clean up some descriptor files in dotnet/linker#293. I'm fine with removing them now that we've added feature switches. Another option is to make it an info message instead. |
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, thank you!
…gle descriptors file (dotnet#101574) In the trimmer we rely on the order of marking to determine if a descriptors file has a duplicate member. As we transition to the dependency analysis framework, the marking order changes, and this exposed scenarios where a descriptors file is found after some items have already been marked. This caused unnecessary IL2025 warnings (Duplicate preserve in descriptor file) to be reported. Instead of using the global marking state, we will keep a per-descriptor-file set of which members are preserved and only report duplicates within that set.
…gle descriptors file (dotnet#101574) In the trimmer we rely on the order of marking to determine if a descriptors file has a duplicate member. As we transition to the dependency analysis framework, the marking order changes, and this exposed scenarios where a descriptors file is found after some items have already been marked. This caused unnecessary IL2025 warnings (Duplicate preserve in descriptor file) to be reported. Instead of using the global marking state, we will keep a per-descriptor-file set of which members are preserved and only report duplicates within that set.
…gle descriptors file (dotnet#101574) In the trimmer we rely on the order of marking to determine if a descriptors file has a duplicate member. As we transition to the dependency analysis framework, the marking order changes, and this exposed scenarios where a descriptors file is found after some items have already been marked. This caused unnecessary IL2025 warnings (Duplicate preserve in descriptor file) to be reported. Instead of using the global marking state, we will keep a per-descriptor-file set of which members are preserved and only report duplicates within that set.
In the trimmer we rely on the order of marking to determine if a descriptors file has a duplicate member. As we transition to the dependency analysis framework, the marking order changes, and this exposed scenarios where a descriptors file is found after some items have already been marked. This caused unnecessary IL2025 warnings (Duplicate preserve in descriptor file) to be reported. Instead of using the global marking state, we should keep a per-descriptor-file set of which members are preserved and only report duplicates within that set.