Skip to content

Add trimming tests for System.ComponentModel.TypeConverter changes - #38066

Merged
layomia merged 3 commits into
dotnet:masterfrom
layomia:linker_tests
Jun 25, 2020
Merged

layomia merged 3 commits into
dotnet:masterfrom
layomia:linker_tests

Conversation

@layomia

@layomia layomia commented Jun 18, 2020

Copy link
Copy Markdown
Contributor

Contributes to #37677 (Strip the ILLinkTrim.xml file from the System.ComponentModel.TypeConverter assembly - #37402)

@layomia layomia added this to the 5.0.0 milestone Jun 18, 2020
@layomia
layomia requested review from eerhardt and joperezr June 18, 2020 03:19
@layomia layomia self-assigned this Jun 18, 2020
@ghost

ghost commented Jun 18, 2020

Copy link
Copy Markdown

Tagging subscribers to this area: @safern
Notify danmosemsft if you want to be subscribed.

@layomia layomia left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eerhardt

Copy link
Copy Markdown
Member

I'm not the best way to test the change in https://github.com/dotnet/runtime/pull/37402/files#diff-64cb2690a89a375e7a29b0c7d3651ba5R704.

These would be tests for the following:

<!-- The following types support the CLR's IClassFactory2 marshaling from CoreLib: -->
<type fullname="System.ComponentModel.LicenseManager/LicenseInteropHelper" />
<type fullname="System.ComponentModel.LicenseManager/CLRLicenseContext" />
<type fullname="System.ComponentModel.LicenseManager/LicInfoHelperLicenseContext" />

I don't know how to test this without writing C/C++ code. Maybe @vitek-karas or @elinor-fung would know?


Also, it might make sense to ensure that the TypeDescriptionProvider attributes on XElement and XAttribute work correctly.
You can test this by calling TypeDescriptor.GetProvider passing in typeof(XElement).

@elinor-fung

Copy link
Copy Markdown
Member

I don't know how to test this without writing C/C++ code.

I think those types are only used during COM activation - activating either a native or managed COM server should exercise them. The problem with a managed COM server is that I'm not sure how building one fits within the testing infrastructure, since we don't/can't use framework references like a normal build considering they are the things under test. Usually, building a managed COM server would make use of the native comhost.dll that is part of the Microsoft.NETCore.App.Host package - it could be mimicked by copying/renaming comhost.dll and creating a .json file. (The coreclr COM tests use their own custom native shim instead.) The other thing I see with using a managed COM server is that I don't think some of the types used for activation (e.g. ComActivator) are marked to be kept (at least that I could see)? What is the expectation for trimmed apps loading COM / components in general?

@eerhardt eerhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@layomia

layomia commented Jun 25, 2020

Copy link
Copy Markdown
Contributor Author

@elinor-fung thanks for the reply. I've logged an issue to address the tests - #38417.

@layomia
layomia deleted the linker_tests branch June 25, 2020 22:03
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants