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

NativeAOT doesnt have a way to remove all occurences of an attribute #80466

Closed
tlakollo opened this issue Jan 10, 2023 · 3 comments
Closed

NativeAOT doesnt have a way to remove all occurences of an attribute #80466

tlakollo opened this issue Jan 10, 2023 · 3 comments
Labels
area-NativeAOT-coreclr size-reduction Issues impacting final app size primary for size sensitive workloads

Comments

@tlakollo
Copy link
Contributor

Description

ILLink has the option of using a wildcard * when processing LinkAttributes xml files. This allows removing an attribute existing in System.Private.CoreLib from all input assemblies (including System.Private.CoreLib). The way ILLink does this is by using its context to remember which attribute needs to be removed. NativeAOT doesnt have access to this context that coul allow to remember which attribute needs to be removed from other assemblies, therefore NativeAOT currently does not support the * wildcard

Reproduction Steps

System.Private.CoreLib actually declares a LinkAttributes xml file with this pattern https://github.com/dotnet/runtime/blob/main/src/mono/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.xml#L10-L15

Expected behavior

The attribute is removed from all the assemblies

Actual behavior

The attribute is kept

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jan 10, 2023
@ghost
Copy link

ghost commented Jan 10, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

ILLink has the option of using a wildcard * when processing LinkAttributes xml files. This allows removing an attribute existing in System.Private.CoreLib from all input assemblies (including System.Private.CoreLib). The way ILLink does this is by using its context to remember which attribute needs to be removed. NativeAOT doesnt have access to this context that coul allow to remember which attribute needs to be removed from other assemblies, therefore NativeAOT currently does not support the * wildcard

Reproduction Steps

System.Private.CoreLib actually declares a LinkAttributes xml file with this pattern https://github.com/dotnet/runtime/blob/main/src/mono/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.xml#L10-L15

Expected behavior

The attribute is removed from all the assemblies

Actual behavior

The attribute is kept

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Author: tlakollo
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

@teo-tsirpanis teo-tsirpanis added the size-reduction Issues impacting final app size primary for size sensitive workloads label Jan 10, 2023
@ghost
Copy link

ghost commented Jan 10, 2023

Tagging subscribers to 'size-reduction': @eerhardt, @SamMonoRT, @marek-safar
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

ILLink has the option of using a wildcard * when processing LinkAttributes xml files. This allows removing an attribute existing in System.Private.CoreLib from all input assemblies (including System.Private.CoreLib). The way ILLink does this is by using its context to remember which attribute needs to be removed. NativeAOT doesnt have access to this context that coul allow to remember which attribute needs to be removed from other assemblies, therefore NativeAOT currently does not support the * wildcard

Reproduction Steps

System.Private.CoreLib actually declares a LinkAttributes xml file with this pattern https://github.com/dotnet/runtime/blob/main/src/mono/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.xml#L10-L15

Expected behavior

The attribute is removed from all the assemblies

Actual behavior

The attribute is kept

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Author: tlakollo
Assignees: -
Labels:

untriaged, size-reduction, area-NativeAOT-coreclr

Milestone: -

@MichalStrehovsky
Copy link
Member

We already track this in #77753.

@MichalStrehovsky MichalStrehovsky closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jan 10, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Feb 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-NativeAOT-coreclr size-reduction Issues impacting final app size primary for size sensitive workloads
Projects
None yet
Development

No branches or pull requests

3 participants