Repository navigation
Closed
Labels
arch-wasmWebAssembly architecturearea-System.ComponentModellinkable-frameworkIssues associated with delivering a linker friendly framework
Milestone
Description
While enabling System.ComponentModel.TypeConverter.Tests on Browser WASM, I faced the failures in System.Xml.Linq.Tests.XTypeDescriptionProviderTests test class.
There are 7 test cases which mostly test the property-related logic for XElement and XAttribute classes (dotnet/corefx#33082).
Those classes are annotated with System.ComponentModel.TypeDescriptionProviderAttribute so that TypeDescriptor.GetProperties() can provide with some additional properties
Lines 36 to 61 in 6072e4d
| public override PropertyDescriptorCollection GetProperties(Attribute[] attributes) | |
| { | |
| PropertyDescriptorCollection properties = new PropertyDescriptorCollection(null); | |
| if (attributes == null) | |
| { | |
| if (typeof(T) == typeof(XElement)) | |
| { | |
| properties.Add(new XElementAttributePropertyDescriptor()); | |
| properties.Add(new XElementDescendantsPropertyDescriptor()); | |
| properties.Add(new XElementElementPropertyDescriptor()); | |
| properties.Add(new XElementElementsPropertyDescriptor()); | |
| properties.Add(new XElementValuePropertyDescriptor()); | |
| properties.Add(new XElementXmlPropertyDescriptor()); | |
| } | |
| else if (typeof(T) == typeof(XAttribute)) | |
| { | |
| properties.Add(new XAttributeValuePropertyDescriptor()); | |
| } | |
| } | |
| foreach (PropertyDescriptor property in base.GetProperties(attributes)) | |
| { | |
| properties.Add(property); | |
| } | |
| return properties; | |
| } | |
| } |
The mentioned tests get a collection of property descriptors by calling something like below
var xel = new XElement("someElement");
var props = TypeDescriptor.GetProperties(xel);
Actually props contains only a collection of some general properties and doesn't include the additional ones.
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architecturearea-System.ComponentModellinkable-frameworkIssues associated with delivering a linker friendly framework
Activity
ericstj commentedon Aug 31, 2020
cc @eerhardt looks like a linker correctness issue.
eerhardt commentedon Sep 1, 2020
We annotated
TypeDescriptionProviderAttributecorrectly to preserve the TypeDescriptionProvider types in .NET 5 RC1. However, it appears this usage exposed an ILLinker issue - it doesn't seem to handle generic types correctly. I've logged dotnet/linker#1469 for this.We won't be able to make progress on this issue in dotnet/runtime since this is an ILLinker issue. Adding
blocked.11 remaining items
eerhardt commentedon Aug 6, 2021
Moving to 7.0 as this scenario isn't necessary in order to ship 6.0. The underlying linker issue dotnet/linker#1536 needs to be fixed before this issue can be resolved.
lewing commentedon Jun 10, 2022
still blocked on dotnet/linker#1536 but that has been raised
ilonatommy commentedon Jun 14, 2022
Unblocked, if @eerhardt you could see if we are able to close it soon, it would be great.
lewing commentedon Jun 14, 2022
looks like #70614 should have the linker fix now