Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Resolve ILLink warnings in System.ComponentModel.TypeConverter (Round 2) #49467
Resolve ILLink warnings in System.ComponentModel.TypeConverter (Round 2) #49467
Changes from 4 commits
a9ed038
8e86d7d
d77e57c
0562916
8141e33
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I wonder if we want this actually. Are the designers ever used at runtime?
The problem is that this will basically force include the designer types and some code from them into apps - but they will never be used (since they're designers, those should not run at runtime).
Also - the only method which accesses this TypeDescriptor.CreateDesigner is already marked with RUC - and I think we should not allow calling it on a trimmed app.
Technically the annotation is correct, I'm questioning if it's the right thing to do for size.
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.
Just because a method is marked with RUC doesn't mean it can't be called in a trimmed app.
Maybe if this becomes a size issue for WinForms, they can strip out
DesignerAttribute
instances by default - similar to how we strip out some attributes in Blazor WASM that aren't needed at runtime.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.
It's a good point that a better size solution is to strip out the attribute as a whole.
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.
These attributes can be and are used at runtime by
PropertyGrid
control, and can be used by custom designers (e.g. a report viewer)