Skip to content
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

Remove RequiresUnreferencedCode from DefaultValueAttribute #97842

Open
Tracked by #4649
LakshanF opened this issue Feb 2, 2024 · 4 comments
Open
Tracked by #4649

Remove RequiresUnreferencedCode from DefaultValueAttribute #97842

LakshanF opened this issue Feb 2, 2024 · 4 comments
Labels
area-System.ComponentModel linkable-framework Issues associated with delivering a linker friendly framework
Milestone

Comments

@LakshanF
Copy link
Member

LakshanF commented Feb 2, 2024

This constructor of DefaultValue has RUC on it. This is likely due to a concern round converters with generic types (Nullable) which has been since fixed in the trimmer.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Feb 2, 2024
@ghost
Copy link

ghost commented Feb 2, 2024

Tagging subscribers to this area: @dotnet/area-system-componentmodel
See info in area-owners.md if you want to be subscribed.

Issue Details

This constructor of DefaultValue has RUC on it. This is likely due to a concern round converters with generic types (Nullable) which has been since fixed in the trimmer.

Author: LakshanF
Assignees: -
Labels:

area-System.ComponentModel

Milestone: -

@steveharter
Copy link
Member

@LakshanF I assume you are proposing removing the RUC. Can you create a PR to do that? Thanks

@steveharter steveharter added this to the 9.0.0 milestone Feb 7, 2024
@steveharter steveharter removed the untriaged New issue has not been triaged by the area owner label Feb 7, 2024
@buyaa-n buyaa-n added the linkable-framework Issues associated with delivering a linker friendly framework label Feb 7, 2024
@ghost
Copy link

ghost commented Feb 7, 2024

Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @sbomer, @joperezr, @marek-safar
See info in area-owners.md if you want to be subscribed.

Issue Details

This constructor of DefaultValue has RUC on it. This is likely due to a concern round converters with generic types (Nullable) which has been since fixed in the trimmer.

Author: LakshanF
Assignees: -
Labels:

area-System.ComponentModel, linkable-framework

Milestone: 9.0.0

@vitek-karas
Copy link
Member

The Nullable problem is actually only one of the reasons for RUC. Once you fix that, you'll notice that there's a secondary problem where the NullableConverter is calling TypeDescriptor.GetConverter for the underlying type:

UnderlyingTypeConverter = TypeDescriptor.GetConverter(UnderlyingType);

That method has RUC, and so we need to propagate it. I think this would only be fixable once we remove RUC on GetConverter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.ComponentModel linkable-framework Issues associated with delivering a linker friendly framework
Projects
None yet
Development

No branches or pull requests

4 participants