Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use consistent packages across platforms for bootstrap #15823

Merged
merged 3 commits into from
Mar 17, 2023

Conversation

mthalman
Copy link
Member

The configuration of which packages to restore for the previously source-built bootstrapping logic has inconsistencies between platforms. For example, there is a runtime.linux-arm64.Microsoft.DotNet.IlCompiler package listed but no runtime.linux-x64.Microsoft.DotNet.IlCompiler. That example is actually the reason for the issue identified in dotnet/source-build#3315.

In order to make the configuration consistent and easier to manage, I've implemented logic which essentially takes the sets of runtime packs and portable packages and produces a cross-product of them against the set of Linux RIDs being targeted (e.g. linux-x64). This cross-product then can produce the full set of package names that need to be restored.

During this analysis, it was discovered that the Microsoft.NET.HostModel and Microsoft.NET.Sdk.IL packages are not needed so these have been removed.

Here's a list of the full set of package names that are generated by this logic:

Microsoft.Aspnetcore.App.Runtime.linux-x64
Microsoft.NETCore.App.Crossgen2.linux-x64
Microsoft.NETCore.App.Host.linux-x64
Microsoft.NETCore.App.Runtime.linux-x64
Microsoft.Aspnetcore.App.Runtime.linux-musl-x64
Microsoft.NETCore.App.Crossgen2.linux-musl-x64
Microsoft.NETCore.App.Host.linux-musl-x64
Microsoft.NETCore.App.Runtime.linux-musl-x64
Microsoft.Aspnetcore.App.Runtime.linux-arm64
Microsoft.NETCore.App.Crossgen2.linux-arm64
Microsoft.NETCore.App.Host.linux-arm64
Microsoft.NETCore.App.Runtime.linux-arm64
Microsoft.Aspnetcore.App.Runtime.linux-musl-arm64
Microsoft.NETCore.App.Crossgen2.linux-musl-arm64
Microsoft.NETCore.App.Host.linux-musl-arm64
Microsoft.NETCore.App.Runtime.linux-musl-arm64
Microsoft.DotNet.IlCompiler
Microsoft.NETCore.DotNetAppHost
Microsoft.NETCore.DotNetHost
Microsoft.NETCore.DotNetHostPolicy
Microsoft.NETCore.DotNetHostResolver
Microsoft.NETCore.ILAsm
Microsoft.NETCore.ILDAsm
Microsoft.NETCore.TestHost
runtime.linux-x64.Microsoft.DotNet.IlCompiler
runtime.linux-x64.Microsoft.NETCore.DotNetAppHost
runtime.linux-x64.Microsoft.NETCore.DotNetHost
runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy
runtime.linux-x64.Microsoft.NETCore.DotNetHostResolver
runtime.linux-x64.Microsoft.NETCore.ILAsm
runtime.linux-x64.Microsoft.NETCore.ILDAsm
runtime.linux-x64.Microsoft.NETCore.TestHost
runtime.linux-musl-x64.Microsoft.DotNet.IlCompiler
runtime.linux-musl-x64.Microsoft.NETCore.DotNetAppHost
runtime.linux-musl-x64.Microsoft.NETCore.DotNetHost
runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostPolicy
runtime.linux-musl-x64.Microsoft.NETCore.DotNetHostResolver
runtime.linux-musl-x64.Microsoft.NETCore.ILAsm
runtime.linux-musl-x64.Microsoft.NETCore.ILDAsm
runtime.linux-musl-x64.Microsoft.NETCore.TestHost
runtime.linux-arm64.Microsoft.DotNet.IlCompiler
runtime.linux-arm64.Microsoft.NETCore.DotNetAppHost
runtime.linux-arm64.Microsoft.NETCore.DotNetHost
runtime.linux-arm64.Microsoft.NETCore.DotNetHostPolicy
runtime.linux-arm64.Microsoft.NETCore.DotNetHostResolver
runtime.linux-arm64.Microsoft.NETCore.ILAsm
runtime.linux-arm64.Microsoft.NETCore.ILDAsm
runtime.linux-arm64.Microsoft.NETCore.TestHost
runtime.linux-musl-arm64.Microsoft.DotNet.IlCompiler
runtime.linux-musl-arm64.Microsoft.NETCore.DotNetAppHost
runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHost
runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostPolicy
runtime.linux-musl-arm64.Microsoft.NETCore.DotNetHostResolver
runtime.linux-musl-arm64.Microsoft.NETCore.ILAsm
runtime.linux-musl-arm64.Microsoft.NETCore.ILDAsm
runtime.linux-musl-arm64.Microsoft.NETCore.TestHost
runtime.linux-x64.runtime.native.System.IO.Ports
runtime.linux-arm64.runtime.native.System.IO.Ports

Fixes dotnet/source-build#3315

@mthalman mthalman requested a review from a team as a code owner March 15, 2023 17:52
</ItemGroup>

<Target Name="BuildBoostrapPreviouslySourceBuilt" AfterTargets="Restore">
<Target Name="GetPackagesToDownload">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried running this locally and it doesn't appear to be downloading/bundling any of the bootstrap packages. This target needs to run before Restore because we rely on it to acquire the packages.

@mthalman mthalman requested a review from MichaelSimons March 16, 2023 19:56
@mthalman mthalman enabled auto-merge (squash) March 16, 2023 20:44
@mthalman mthalman requested a review from MichaelSimons March 17, 2023 15:33
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Offline CI legs are failing to find package runtime.linux-x64.Microsoft.DotNet.ILCompiler
2 participants