[release/5.0-rc2] Exclude .a files from the runtime native files when packaging#41986
Closed
github-actions[bot] wants to merge 1 commit intorelease/5.0-rc2from
Closed
[release/5.0-rc2] Exclude .a files from the runtime native files when packaging#41986github-actions[bot] wants to merge 1 commit intorelease/5.0-rc2from
github-actions[bot] wants to merge 1 commit intorelease/5.0-rc2from
Conversation
There's no use for the .a files in the shared framework or runtime pack, they just increase disk size. Also not that we didn't include them in 3.1, so it's effectively a regression in 5.0.
Collaborator
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
jkotas
approved these changes
Sep 8, 2020
jkoritzinsky
approved these changes
Sep 8, 2020
jeffschwMSFT
approved these changes
Sep 9, 2020
Member
jeffschwMSFT
left a comment
There was a problem hiding this comment.
Approved. We can take this for consideration in RC2
Member
|
Reconsidered due to the potential breaking nature. |
Member
|
Just curious, for context, what is the size of a hello world self contained app, of which this 7MB is a part? |
Member
|
We recently published numbers in our trimming blog entry (https://devblogs.microsoft.com/dotnet/app-trimming-in-net-5/). 7mb is roughly 10% |
Member
|
Moving to .NET 6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #41966 to release/5.0-rc2
/cc @vitek-karas
Customer Impact
We're including static lib files (
.a) with our native libraries when shipping either shared framework or runtime packs. These files are not used by the runtime in any way, so it's wasted space. This makes both shared framework and probably more importantly any self-contained app bigger.On linux-x64 these files combined are almost 7MB in size.
Testing
Verified that the files are not packaged into the runtime packages produced by the dotnet/runtime repo build.
Risk
I think it's low - the affected libraries are all internal and we don't document their APIs. At runtime they're only used through PInvoke which doesn't use
.afiles for anything. The only possible break would be if somebody used the files to link against the native libraries - for which we don't document any APIs and they're considered internal implementation detail.The affected files are:
Note that we shipped these in 3.1 both in the shared framework as well as when publishing self-contained apps. So it's not a regression in 5.0 to keep shipping them if we decide to do so.