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

Resolve ILLink warnings in System.Runtime.Serialization.Formatters #46964

Merged

Conversation

eerhardt
Copy link
Member

Contributes to #45623

cc @jeffhandley @bartonjs as listed area owners

@eerhardt eerhardt added area-System.Runtime linkable-framework Issues associated with delivering a linker friendly framework labels Jan 14, 2021
@ghost
Copy link

ghost commented Jan 14, 2021

Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @tannergooding
See info in area-owners.md if you want to be subscribed.

Issue Details

Contributes to #45623

cc @jeffhandley @bartonjs as listed area owners

Author: eerhardt
Assignees: -
Labels:

area-System.Runtime, linkable-framework

Milestone: -

@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

private List<MethodInfo>? GetMethodsWithAttribute(Type attribute, Type? t)
private List<MethodInfo>? GetMethodsWithAttribute(
Type attribute,
// currently the only way to preserve base, non-public methods is to use All
Copy link
Member

Choose a reason for hiding this comment

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

Is that something the linker plans to fix - if so should this be tracked somehow to fix later?

Copy link
Member

Choose a reason for hiding this comment

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

I'm starting to wonder if PrivateMethods should be changed to mean private methods across the entire hierarchy - and not the current reflection semantics which is pretty confusing.

Copy link
Member

Choose a reason for hiding this comment

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

I'm starting to wonder if PrivateMethods should be changed to mean private methods across the entire hierarchy

It's going to keep more stuff so the question is whether it's worth it. Matching reflection semantics currently means we keep exactly what "regular" reflection needs.

Looking at API usage statistics of Type.BaseType could be used as a first approximation - apps that don't use it would definitely not benefit from extending the semantics. Apps that use it might. Seems like Apisof.net no longer has usage statistics which is where I used to go looking for that stuff.

Copy link
Member

@vitek-karas vitek-karas left a comment

Choose a reason for hiding this comment

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

We can obviously improve these - but as is it should work.

@eerhardt
Copy link
Member Author

I believe all feedback has been addressed, if anyone wants to take another look. I'll merge this later today if I don't hear anything.

@eerhardt
Copy link
Member Author

Android failure is #47185

@eerhardt eerhardt merged commit 8f9edb3 into dotnet:master Jan 19, 2021
@eerhardt eerhardt deleted the SerializationFormattersILLinkWarnings branch January 19, 2021 22:57
eerhardt added a commit to dotnet/sdk that referenced this pull request Jan 22, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime linkable-framework Issues associated with delivering a linker friendly framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants