Skip to content

[wasm] Enable System.Xml.Linq.Tests.XTypeDescriptionProviderTests class #39709

Closed

Description

@MaximLipnin

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

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.

Activity

  1. added
    untriaged
    on Jul 21, 2020
  2. added
    arch-wasm
    on Aug 4, 2020
  3. removed
    untriaged
    on Aug 4, 2020
  4. added this to the 5.0.0 milestone on Aug 4, 2020
  5. added
    linkable-framework
    on Aug 31, 2020
  6. ericstj commented on Aug 31, 2020

    @ericstj
    Member

    cc @eerhardt looks like a linker correctness issue.

  7. eerhardt commented on Sep 1, 2020

    @eerhardt
    Member

    We annotated TypeDescriptionProviderAttribute correctly 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.

  8. added
    blocked
    on Sep 1, 2020
  9. removed this from the 5.0.0 milestone on Sep 3, 2020
  10. 11 remaining items

  11. modified the milestones: 6.0.0, 7.0.0 on Jul 23, 2021
  12. eerhardt commented on Aug 6, 2021

    @eerhardt
    Member

    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.

  13. modified the milestones: 6.0.0, 7.0.0 on Aug 6, 2021
  14. lewing commented on Jun 10, 2022

    @lewing
    Member

    still blocked on dotnet/linker#1536 but that has been raised

  15. removed
    blocked
    on Jun 14, 2022
  16. ilonatommy commented on Jun 14, 2022

    @ilonatommy
    Member

    Unblocked, if @eerhardt you could see if we are able to close it soon, it would be great.

  17. lewing commented on Jun 14, 2022

    @lewing
    Member

    looks like #70614 should have the linker fix now

  18. ghost added
    in-pr
    on Jul 8, 2022
  19. ghost removed
    in-pr
    on Jul 9, 2022
  20. ghost locked as resolved and limited conversation to collaborators on Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-System.ComponentModellinkable-framework

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions