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

DataContractSerialization is not linker friendly #36154

Closed
eerhardt opened this issue May 8, 2020 · 5 comments
Closed

DataContractSerialization is not linker friendly #36154

eerhardt opened this issue May 8, 2020 · 5 comments
Assignees
Labels
area-Serialization linkable-framework Issues associated with delivering a linker friendly framework
Milestone

Comments

@eerhardt
Copy link
Member

eerhardt commented May 8, 2020

See this comment:

<!-- Too much private reflection. Do not bother with trimming -->
<ILLinkTrimAssembly>false</ILLinkTrimAssembly>

This setting only applies to running the linker during the dotnet/runtime build. It doesn't affect when a user's application uses this library and is trimmed.

If there is too much private reflection for this assembly to be trimmed, it isn't going to work well when an application using it is trimmed. We should ensure DataContractSerialization can be used safely by linked applications.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-Serialization untriaged New issue has not been triaged by the area owner labels May 8, 2020
@jkotas jkotas added the linkable-framework Issues associated with delivering a linker friendly framework label May 9, 2020
@HongGit HongGit removed the untriaged New issue has not been triaged by the area owner label Jun 25, 2020
@HongGit
Copy link
Contributor

HongGit commented Jun 25, 2020

The code is too intricate to be trimmed safely.

@HongGit HongGit closed this as completed Jun 25, 2020
@eerhardt
Copy link
Member Author

We should annotate the API with [RequiresUnreferencedCode] attributes then, so someone who is trimming their app gets warnings when they call this code.

@eerhardt eerhardt reopened this Jun 26, 2020
@HongGit
Copy link
Contributor

HongGit commented Jul 1, 2020

@eerhardt are you going to do this work? Can you please assign a milestone to this issue?

@eerhardt eerhardt added this to the 6.0.0 milestone Jul 1, 2020
@eerhardt
Copy link
Member Author

eerhardt commented Jul 1, 2020

@eerhardt are you going to do this work? Can you please assign a milestone to this issue?

I'm not sure who will actually do the work. But there will be an effort to get the libraries annotated in 6.0, so I moved it to there.

@eerhardt
Copy link
Member Author

This has been addressed with #50619 and #51200. Closing.

@ghost ghost locked as resolved and limited conversation to collaborators May 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Serialization linkable-framework Issues associated with delivering a linker friendly framework
Projects
None yet
Development

No branches or pull requests

5 participants