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

Rooting serializable types for TrimTestBinaryDeserialization test #11342

Conversation

LakshanF
Copy link
Member

@LakshanF LakshanF commented May 9, 2024

There is no reliable way for the trimmer to statically reach types that are needed for resource serialization and deserialization. The current plan is to keep all relevant library types that are serializable to get resources working with trimmed WinForms applications.

The first iteration of this effort is to root all types in runtime and windowsdesktop (with WindowsForms profile) assemblies that are serializable (except compiler generated types that are serializable). Additionally, there are couple of exceptions that are needed to be rooted for this test application to run in a trimmed mode; All of mscorlib assembly is rooted and a couple of additional types in the System.Resources.Extensions assembly (DeserializingResourceReader, RuntimeResourceSet).

Future iterations should look at more simple WinForms applications with custom resources to identify a core set of library types that need to be keep for basic WinForms applications with custom resources to be trimmed.

Microsoft Reviewers: Open in CodeFlow

@LakshanF LakshanF requested a review from a team as a code owner May 9, 2024 18:05
@LakshanF LakshanF self-assigned this May 9, 2024
Copy link

codecov bot commented May 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.24401%. Comparing base (4095304) to head (9db6115).

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #11342         +/-   ##
===================================================
+ Coverage   74.24289%   74.24401%   +0.00112%     
===================================================
  Files           3022        3022                 
  Lines         626297      626297                 
  Branches       46702       46702                 
===================================================
+ Hits          464981      464988          +7     
+ Misses        157921      157911         -10     
- Partials        3395        3398          +3     
Flag Coverage Δ
Debug 74.24401% <ø> (+0.00112%) ⬆️
integration 18.26738% <ø> (+0.00210%) ⬆️
production 46.91646% <ø> (+0.00140%) ⬆️
test 97.03729% <ø> (+0.00087%) ⬆️
unit 43.87313% <ø> (+0.02598%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@LakshanF LakshanF merged commit 74caf32 into dotnet:main May 14, 2024
8 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0 Preview5 milestone May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants