-
Notifications
You must be signed in to change notification settings - Fork 128
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
Add a feature that prevents types that inherit from specific types or interfaces from being trimmed #1806
Comments
Looking at the pull request in aspnetcore I think there are two orthogonal issues:
|
|
Th only annoyance with combining 2 with dataflow analysis is that now we need to model collections and enumerators. Not unimaginable, but it's extra work. Maybe to avoid someone being too lazy and doing |
That's certainly a workable strategy. |
Well - not really. The Requiring attribute would work I guess - not sure we have to add it - it's basically just to guard against extreme behaviors. Linker already tracks all of the interfaces/bases for other reasons (instantiation detection and virtual method removal), so I don't see this being a big change to how linker works. |
@pranavkm It is now possible to place |
A common pattern in ASP.NET Core is to have well known types or interfaces such as
IComponent
,Controller
orHub
, that a user derives from and the framework reflects over. For e.g.In the component case, having the ability to have type level trimming would help - if the type is referenced, always preserve it's members. In the event of a Controller or a Hub, we want the ability to say always preserve any types that derive from these types since they're primarily discovered and accessed via reflection.
The text was updated successfully, but these errors were encountered: