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

DefaultValueAttribute support change introduce new linker warnings #105857

Closed
akoeplinger opened this issue Aug 2, 2024 · 5 comments · Fixed by dotnet/sdk#42580
Closed

DefaultValueAttribute support change introduce new linker warnings #105857

akoeplinger opened this issue Aug 2, 2024 · 5 comments · Fixed by dotnet/sdk#42580
Assignees
Labels
area-System.ComponentModel linkable-framework Issues associated with delivering a linker friendly framework test-failure
Milestone

Comments

@akoeplinger
Copy link
Member

akoeplinger commented Aug 2, 2024

See dotnet/sdk#42496 (comment)

Disabling the test temporarily so we can unblock codeflow, filing this issue to track reenabling it.

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Aug 2, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-componentmodel
See info in area-owners.md if you want to be subscribed.

@akoeplinger akoeplinger added this to the 9.0.0 milestone Aug 2, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Aug 2, 2024
@steveharter steveharter self-assigned this Aug 2, 2024
@ericstj
Copy link
Member

ericstj commented Aug 6, 2024

@akoeplinger mentioned that #105766 introduced a new linker warning

+ ILLink : Trim analysis warning IL2026: System.ComponentModel.DefaultValueAttribute.DefaultValueAttribute(Type, String): Using member 'System.ComponentModel.DefaultValueAttribute.<.ctor>g__TryConvertFromInvariantString|5_0(Type, String, Object&)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. DefaultValueAttribute usage of TypeConverter is not compatible with trimming.

Seems the test just creates a very simple hello world.

@steveharter @LakshanF can you have a look and see if this is expected?

We should also make sure the test gets reenabled in SDK. @sbomer who appears to maintain this test.

@ericstj ericstj added linkable-framework Issues associated with delivering a linker friendly framework test-failure labels Aug 6, 2024
@ericstj ericstj changed the title SDK test ILLink_verify_analysis_warnings_framework_assemblies fails after #105766 DefaultValueAttribute support change introduce new linker warnings Aug 6, 2024
@sbomer
Copy link
Member

sbomer commented Aug 6, 2024

The test already has an expected warning for the DefaultValueAttribute(Type, String) ctor's call to the local function TryConvertFromInvariantString, but the name mangling looks like it changed from g__TryConvertFromInvariantString|4_0 to g__TryConvertFromInvariantString|5_0. I think the expected warning in the test just needs to be updated.

@akoeplinger
Copy link
Member Author

Ah thanks, makes sense. I'll open an SDK PR.

akoeplinger added a commit to dotnet/sdk that referenced this issue Aug 7, 2024
We just needed to update the expected method name.

Fixes dotnet/runtime#105857
@steveharter
Copy link
Member

Ah thanks, makes sense. I'll open an SDK PR.

Closing this issue then.

akoeplinger added a commit to dotnet/sdk that referenced this issue Aug 8, 2024
We just needed to update the expected method name.

Fixes dotnet/runtime#105857
@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.ComponentModel linkable-framework Issues associated with delivering a linker friendly framework test-failure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants