Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Powershell v7.4.0-preview.5 Alpine nupkg doubled in size doubled compared to v7.4.0-preview.3 #20177

Copy link
Copy link
@lbussell

Description

@lbussell
Issue body actions

Prerequisites

Steps to reproduce

We install PowerShell nupkgs in the official .NET 8.0 Preview SDK images for Alpine Linux. With the upgrade to PowerShell 7.4.0-preview.5, we noticed significant increase in the PowerShell installation size.

We download the nupkg from https://pwshtool.blob.core.windows.net/tool/7.4.0-preview.5/PowerShell.Linux.Alpine.7.4.0-preview.5.nupkg

Here's a size comparison between the installation directories before and after the preview.5 update:

PS C:\sources> docker run --entrypoint /bin/sh --rm mcr.microsoft.com/dotnet/nightly/sdk:8.0.100-rc.1-alpine3.18-amd64 -c "du -hs /usr/share/powershell"                   
85.4M   /usr/share/powershell  
PS C:\sources> docker run --entrypoint /bin/sh --rm mcr.microsoft.com/dotnet/nightly/sdk@sha256:db13f9a424d5f24155db7b0bcd8fa159afad9df7f520f830b57bce9f94757f6a -c "du -hs /usr/share/powershell"                                                  
40.3M   /usr/share/powershell

I downloaded the following nupkgs and checked their sizes to make sure it wasn't an incorrect installation that increased the size:

https://pwshtool.blob.core.windows.net/tool/7.4.0-preview.3/PowerShell.Linux.x64.7.4.0-preview.3.nupkg
    => 13.65M
https://pwshtool.blob.core.windows.net/tool/7.4.0-preview.3/PowerShell.Linux.Alpine.7.4.0-preview.3.nupkg
    => 13.66M
https://pwshtool.blob.core.windows.net/tool/7.4.0-preview.5/PowerShell.Linux.x64.7.4.0-preview.5.nupkg
    => 15.42M
https://pwshtool.blob.core.windows.net/tool/7.4.0-preview.5/PowerShell.Linux.Alpine.7.4.0-preview.5.nupkg
    => 33.86M

I also looked in the installation to see if there were any out-of-place files. Here are the 20 biggest files in the new vs. old installations. Notably, many of the files that are similar between each release have grown in size. Maybe debug symbols are included in the musl build?:

PS C:\sources\dotnet-docker> docker run --entrypoint /bin/sh --rm mcr.microsoft.com/dotnet/nightly/sdk:8.0.100-rc.1-alpine3.18-amd64 -c "find /usr/share/powershell -type f  -exec du -h {} + | sort -r -h | head -n 20"
18.2M   /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/System.Management.Automation.dll
17.2M   /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/Microsoft.CodeAnalysis.CSharp.dll
7.2M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/Microsoft.CodeAnalysis.dll
6.1M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/System.Private.ServiceModel.dll
2.3M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/System.Data.SqlClient.dll
1.8M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/Newtonsoft.Json.dll
1.6M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/Microsoft.PowerShell.Commands.Utility.dll
1.4M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/System.Drawing.Common.dll
1.3M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/Modules/PowerShellGet/PSModule.psm1
1.3M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/Markdig.Signed.dll
1.0M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/System.Configuration.ConfigurationManager.dll
916.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/Microsoft.ApplicationInsights.dll
812.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/ref/System.Runtime.dll
788.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/System.Web.Services.Description.dll
788.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/Microsoft.PowerShell.Commands.Management.dll
764.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/Modules/Microsoft.PowerShell.PSResourceGet/dependencies/NuGet.Protocol.dll
724.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/System.ComponentModel.Composition.dll
688.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/Modules/Microsoft.PowerShell.PSResourceGet/dependencies/Newtonsoft.Json.dll
672.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/Modules/Microsoft.PowerShell.PSResourceGet/dependencies/NuGet.Packaging.dll
644.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.5/powershell.linux.alpine/7.4.0-preview.5/tools/net8.0/any/JsonSchema.Net.dll
PS C:\sources\dotnet-docker> docker run --entrypoint /bin/sh --rm mcr.microsoft.com/dotnet/nightly/sdk@sha256:db13f9a424d5f24155db7b0bcd8fa159afad9df7f520f830b57bce9f94757f6a -c "find /usr/share/powershell -type f  -exec du -h {} + | sort -r -h | h
ead -n 20"
7.3M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/System.Management.Automation.dll
6.0M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/Microsoft.CodeAnalysis.CSharp.dll
2.7M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/Microsoft.CodeAnalysis.dll
2.6M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/System.Private.ServiceModel.dll
1.3M    /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/Modules/PowerShellGet/PSModule.psm1
936.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll       
836.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/Microsoft.PowerShell.Commands.Utility.dll
788.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/ref/System.Runtime.dll
696.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/Newtonsoft.Json.dll
608.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/System.Drawing.Common.dll
464.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/Markdig.Signed.dll
444.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/_manifest/spdx_2.2/manifest.spdx.json
432.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/System.Configuration.ConfigurationManager.dll
428.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/Microsoft.PowerShell.Commands.Management.dll
380.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/Microsoft.ApplicationInsights.dll
376.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/System.Web.Services.Description.dll
352.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/_manifest/spdx_2.2/manifest.spdx.json
312.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/Modules/PackageManagement/coreclr/netstandard2.0/Microsoft.PackageManagement.dll
312.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/Modules/PSReadLine/Microsoft.PowerShell.PSReadLine2.dll
312.0K  /usr/share/powershell/.store/powershell.linux.alpine/7.4.0-preview.3/powershell.linux.alpine/7.4.0-preview.3/tools/net8.0/any/Microsoft.PowerShell.ConsoleHost.dll

Expected behavior

`PowerShell.Linux.Alpine.7.4.0-preview.5.nupkg` is a similar size to the normal Linux nupkg as well as a similar size to the previous release unless there is a good explanation.

Actual behavior

`PowerShell.Linux.Alpine.7.4.0-preview.5.nupkg` is twice the size of `PowerShell.Linux.x64.7.4.0-preview.5.nupkg`

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.0-preview.5
PSEdition                      Core
GitCommitId                    7.4.0-preview.5
OS                             Alpine Linux v3.18
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.