-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Make ComponentModel intrinsic TypeConverters linker-safe #39973
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
Conversation
|
Tagging subscribers to this area: @safern |
...tem.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
Outdated
Show resolved
Hide resolved
...tem.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
Outdated
Show resolved
Hide resolved
...tem.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
Outdated
Show resolved
Hide resolved
|
Can we add a couple tests for this? |
...tem.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
Outdated
Show resolved
Hide resolved
...tem.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
Outdated
Show resolved
Hide resolved
...tem.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
Outdated
Show resolved
Hide resolved
…to new method, add trimming tests
...tem.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
Outdated
Show resolved
Hide resolved
Since this method is only used for editors now, can we:
Refers to: src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs:1336 in 072efce. [](commit_id = 072efce, deletion_comment = False) |
...tem.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
Outdated
Show resolved
Hide resolved
...tem.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
Outdated
Show resolved
Hide resolved
...tem.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
Outdated
Show resolved
Hide resolved
...tem.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
Show resolved
Hide resolved
...tem.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
Show resolved
Hide resolved
eerhardt
left a comment
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.
Looks good to me. Thanks for getting this taken care of. This should eliminate the need for the LinkerWorkaround.xml in Blazor now.
* Make ComponentModel intrinsic TypeConverters linker-safe * Avoid reflection in converter func lookup * Re-add code path that supports editors * Consolidate intrinsic converter caches, move converter-specific code to new method, add trimming tests * Address feedback * Revert change to GetIntrinsicTypeEditor method * Handle inheritance with Uri and CultureInfo types * Add heirarchy-related comments to cache docs
It tests internal implementation details, and those details have now changed (dotnet/runtime#39973). So just skip the entire test for now. Fixes this test failure: DontLink.CommonDontLinkTest [FAIL] TypeDescriptorCanary : System.InvalidCastException : Specified cast is not valid. : at DontLink.CommonDontLinkTest.TypeDescriptorCanary() in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/linker/CommonDontLinkTest.cs:line 22 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
It tests internal implementation details, and those details have now changed (dotnet/runtime#39973). So just skip the entire test for now. Fixes this test failure: DontLink.CommonDontLinkTest [FAIL] TypeDescriptorCanary : System.InvalidCastException : Specified cast is not valid. : at DontLink.CommonDontLinkTest.TypeDescriptorCanary() in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/linker/CommonDontLinkTest.cs:line 22 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Fixes #38582