-
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
Lack of DynamicallyAccessedMemberTypes for any default constructor forces keeping unused types #50353
Comments
Tagging subscribers to 'size-reduction': @eerhardt, @SamMonoRT, @marek-safar, @tannergooding, @CoffeeFlux Issue DetailsOne example is
System.Runtime.Serialization.StreamingContext via EnumComparer<T> private ctors. I far as I know there is no workaround for this.
|
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Looking through all the callsites of The only one that doesn't look this way is runtime/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.cs Lines 180 to 183 in 82ca681
But that class isn't public in a contract - just in the implementation, and the comment indicates it needs to be public due to binary serialization. Since this isn't in a public contract, we could make its parameterless constructor public. Then we can change |
I guess that could work. |
I can put up a PR after #50232 is merged. |
…essConstructor This allows private constructors on the Types to be trimmed. Fix dotnet#50353
One example is
runtime/src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs
Line 1838 in 72f5766
System.Runtime.Serialization.StreamingContext
viaEnumComparer<T>
private ctors. I far as I know there is no workaround for this./cc @eerhardt @vitek-karas
The text was updated successfully, but these errors were encountered: