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

ArPow stage 1: local source-build infrastructure #53294

Merged
merged 50 commits into from
Jun 22, 2021

Conversation

MichaelSimons
Copy link
Member

@MichaelSimons MichaelSimons commented May 26, 2021

This PR adds the local build infrastructure that lets ArPow (arcade-powered source-build) run in this repo. See https://github.com/dotnet/source-build/blob/master/Documentation/planning/arcade-powered-source-build/onboarding/local-onboarding.md for more details about how it works.

To try it out locally, run this on Linux: ./build.sh -c Release --restore --build --pack /p:ArcadeBuildFromSource=true -bl

The patches included in this PR were migrated from 5.0 source-build with any necessary updates for 6.0.

This PR should have no effect on ordinary builds, or CI. ArPow stage 2 will add source-build to CI: PR validation and official builds.

For https://github.com/dotnet/source-build/blob/master/Documentation/planning/arcade-powered-source-build/implementation-plan.md

Fixes: dotnet/source-build#2052

dagood and others added 30 commits February 3, 2021 23:57
…tage1

Conflicts:
	eng/Version.Details.xml
	src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj
	src/libraries/Native/Unix/System.Security.Cryptography.Native/pal_ssl.c
Exclude="$(MSBuildThisFileDirectory)*\src\**\*.shproj"/>
</ItemGroup>

<!-- Need the PackageIndexFile file property from baseline.props -->
<Import Project="$(PkgDir)baseline\baseline.props" />

<!-- Calculate PackageDownload items for restore. -->
<Import Project="$(RepositoryEngineeringDir)restore\harvestPackages.targets" Condition="'$(MSBuildRestoreSessionId)' != ''" />
<Import Project="$(RepositoryEngineeringDir)restore\harvestPackages.targets" Condition="'$(MSBuildRestoreSessionId)' != '' and '$(DotNetBuildFromSource)' != 'true'" />
Copy link
Member Author

Choose a reason for hiding this comment

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

@ViktorHofer - I see you removed the 0027-Remove-libraries-packages.proj-harvesting.patch with 6c2e477#diff-a195cee0207dfe976258d38145c8edb053bbe098930d1b701b36aaba78aa9855. This breaks source-build with:

  /repos/runtime/artifacts/source-build/self/src/eng/restore/harvestPackages.targets(12,5): error MSB4062: The "GetLastStablePackage" task could not be loaded from the assembly /repos/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.build.tasks.packaging/6.0.0-beta.21311.3/tools/net5.0/Microsoft.DotNet.Build.Tasks.Packaging.dll. Could not load file or assembly '/repos/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.build.tasks.packaging/6.0.0-beta.21311.3/tools/net5.0/Microsoft.DotNet.Build.Tasks.Packaging.dll'. The system cannot find the path specified. [/repos/runtime/artifacts/source-build/self/src/Build.proj]
  /repos/runtime/artifacts/source-build/self/src/eng/restore/harvestPackages.targets(12,5): error MSB4062:  Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [/repos/runtime/artifacts/source-build/self/src/Build.proj]

I added the changes in the patch to fix source-build. What were you expecting to be the patch resolution?

Copy link
Member

@ViktorHofer ViktorHofer Jun 14, 2021

Choose a reason for hiding this comment

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

I just inlined the patch into main an hour ago:

<Import Project="$(RepositoryEngineeringDir)restore\harvestPackages.targets" Condition="'$(MSBuildRestoreSessionId)' != '' and '$(DotNetBuildFromSource)' != 'true'" />

<ProjectReference Include="Microsoft.NETCore.ILDAsm\Microsoft.NETCore.ILDAsm.proj" />
+ </ItemGroup>
+
+ <ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
Copy link
Member Author

Choose a reason for hiding this comment

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

Integrating this patch with #54222.

<OutputPath>$(RuntimeBinDir)/dotnet-pgo</OutputPath>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
- <RuntimeIdentifiers>linux-x64;linux-musl-x64;win-x64</RuntimeIdentifiers>
Copy link
Member Author

Choose a reason for hiding this comment

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

After discussing this with @dseefeld, we believe this patch is obsolete because dotnet-pgo.csproj is now excluded when building source-build.

<Target Name="CategorizeRuntimeSupplementalArtifacts"
BeforeTargets="GetCategorizedIntermediateNupkgContents">
<ItemGroup>
<!--
Copy link
Member Author

Choose a reason for hiding this comment

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

FYI - I logged an issue for having the ArPOW infrastructure handle large packages.

@MichaelSimons
Copy link
Member Author

Reviewers, please take another look and provide feedback. There are only 3 patches remaining. What needs to be resolved before we can merge? Thanks

Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

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

I'm not seeing anything here that's blocking, but I'd like other reviewers to weigh in too. I made a couple nice to have suggestions.

Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

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

This looks really great now. Thanks for all your time and dedication @MichaelSimons 💯

@MichaelSimons
Copy link
Member Author

MichaelSimons commented Jun 22, 2021

Looks like the (CoreCLR Pri0 Runtime Tests Run windows arm64 checked) failure is happening for other PRs as well on the same test case (.packages\microsoft.dotnet.helix.sdk\6.0.0-beta.21311.3\tools\Microsoft.DotNet.Helix.Sdk.MultiQueue.targets#L78)- e.g. https://github.com/dotnet/runtime/pull/54522/checks?check_run_id=2879806663

@ViktorHofer ViktorHofer merged commit 849033a into dotnet:main Jun 22, 2021
@MichaelSimons MichaelSimons deleted the arpow-stage1 branch June 22, 2021 13:23
@ghost ghost locked as resolved and limited conversation to collaborators Jul 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ArPow] Onboard runtime to arcade-powered source-build
8 participants