-
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
Trimmer removes InternalsVisibleTo
attributes for assemblies which are trimmed
#92582
Comments
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas Issue DetailsTrimmer has special code to handle This creates an observable difference in behavior between trimmed and non-trimmed apps without getting a trim analysis warning. The app can use reflection to inspect the The trimmer should preserve all
|
There are existing tests covering this functionality https://github.com/dotnet/runtime/blob/main/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/IVTUnused.cs. |
Removes previous special handling to only keep IVT attributes for assemblies that were resolvable and marked at link time. This behaviour could cause a noticeable difference in behaviour at runtime without emitting any trim analysis warnings while providing no mechanism to retain the attributes. The removal of these attributes provides only a neglible size reduction. Fixes dotnet#92582
Removes previous special handling to only keep IVT attributes for assemblies that were resolvable and marked at link time. This behaviour could cause a noticeable difference in behaviour at runtime without emitting any trim analysis warnings while providing no mechanism to retain the attributes. The removal of these attributes provides only a neglible size reduction. Fixes dotnet#92582
Removes previous special handling to only keep IVT attributes for assemblies that were resolvable and marked at link time. This behaviour could cause a noticeable difference in behaviour at runtime without emitting any trim analysis warnings while providing no mechanism to retain the attributes. The removal of these attributes provides only a neglible size reduction. Fixes dotnet#92582
Removes previous special handling to only keep IVT attributes for assemblies that were resolvable and marked at link time. This behaviour could cause a noticeable difference in behaviour at runtime without emitting any trim analysis warnings while providing no mechanism to retain the attributes. The removal of these attributes provides only a neglible size reduction. Fixes dotnet#92582
Removes previous special handling to only keep IVT attributes for assemblies that were resolvable and marked at link time. This behaviour could cause a noticeable difference in behaviour at runtime without emitting any trim analysis warnings while providing no mechanism to retain the attributes. The removal of these attributes provides only a neglible size reduction. Fixes dotnet#92582
Removes previous special handling to only keep IVT attributes for assemblies that were resolvable and marked at link time. This behaviour could cause a noticeable difference in behaviour at runtime without emitting any trim analysis warnings while providing no mechanism to retain the attributes. The removal of these attributes provides only a neglible size reduction. Fixes dotnet#92582
Removes previous special handling to only keep IVT attributes for assemblies that were resolvable and marked at link time. This behaviour could cause a noticeable difference in behaviour at runtime without emitting any trim analysis warnings while providing no mechanism to retain the attributes. The removal of these attributes provides only a neglible size reduction. Fixes dotnet#92582
Removes previous special handling to only keep IVT attributes for assemblies that were resolvable and marked at link time. This behaviour could cause a noticeable difference in behaviour at runtime without emitting any trim analysis warnings while providing no mechanism to retain the attributes. The removal of these attributes provides only a neglible size reduction. Fixes #92582
…98910) Removes previous special handling to only keep IVT attributes for assemblies that were resolvable and marked at link time. This behaviour could cause a noticeable difference in behaviour at runtime without emitting any trim analysis warnings while providing no mechanism to retain the attributes. The removal of these attributes provides only a neglible size reduction. Fixes dotnet#92582
…98910) Removes previous special handling to only keep IVT attributes for assemblies that were resolvable and marked at link time. This behaviour could cause a noticeable difference in behaviour at runtime without emitting any trim analysis warnings while providing no mechanism to retain the attributes. The removal of these attributes provides only a neglible size reduction. Fixes dotnet#92582
Trimmer has special code to handle
InternalsVisibleToAttribute
. Specifically, it tries to remove those attribute instances which point to assemblies which either can't be resolved, or which are not kept in the app after trimming.https://github.com/dotnet/runtime/blob/main/src/tools/illink/src/linker/Linker.Steps/MarkStep.cs#L295-L307
This creates an observable difference in behavior between trimmed and non-trimmed apps without getting a trim analysis warning. The app can use reflection to inspect the
InternalsVisibleTo
attributes and it will see a different set after trimming.The trimmer should preserve all
InternalsVisibleTo
attributes, the size savings are very small.The text was updated successfully, but these errors were encountered: