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

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

Merged
merged 3 commits into from
Jun 25, 2020

Conversation

layomia
Copy link
Contributor

@layomia layomia commented Jun 18, 2020

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 self-assigned this Jun 18, 2020
@ghost
Copy link

ghost commented Jun 18, 2020

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

Copy link
Contributor Author

@layomia layomia left a comment

Choose a reason for hiding this comment

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

@eerhardt
Copy link
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
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?

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

LGTM

@layomia
Copy link
Contributor Author

layomia commented Jun 25, 2020

@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.

None yet

4 participants