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

Build the "in build" crossgen2 into a pack that we can use within the VMR #110676

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

jkoritzinsky
Copy link
Member

@jkoritzinsky jkoritzinsky commented Dec 13, 2024

For the same reasons that we need an "in build" crossgen2 in dotnet/runtime, we need one in the VMR for cross-builds of downstream repos (like aspnetcore).

Opening as draft until I can get enough pieces together to validate the end-to-end experience. This will need changes in aspnetcore, windowsdesktop, sdk, and the orchestration for dotnet/runtime (to put the host crossgen2 package in a place where it won't accidentally get off the machine or cause conflicts in asset selection).

Contributes to dotnet/source-build#3793

Copy link
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

…ary and it breaks the new crossgen2 host package
…gen2 tasks in the SDK to discover the target OS from the source-build target RID
@jkoritzinsky jkoritzinsky marked this pull request as ready for review December 18, 2024 23:21
@jkoritzinsky jkoritzinsky requested review from a team and ivdiazsa December 18, 2024 23:23
Copy link
Member Author

Choose a reason for hiding this comment

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

All changes in this file are a workaround until the bootstrap SDK for source-build has dotnet/sdk#45566 included.

eng/DotNetBuild.props Outdated Show resolved Hide resolved
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<EnableDefaultArtifacts Condition="'$(DotNetBuild)' != 'true'">false</EnableDefaultArtifacts>
<EnableDefaultArtifacts>false</EnableDefaultArtifacts>
Copy link
Member

Choose a reason for hiding this comment

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

Why can't we use default artifact lookup here anymore and then just update the items and put the Visibility metadata on them?

Copy link
Member Author

Choose a reason for hiding this comment

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

By the time we can hook a target in, NuGet packages have already been added to the ItemsToPushToBlobFeed item group, which as far as I can tell is not a "documented" repo extension point. We can't manipulate it through the Artifact item group. I can likely change this to try to catch it and its symbol package midway through in that group and adjust it.

Copy link
Member

Choose a reason for hiding this comment

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

Why do we need a target? Can't we do this at evaluation time?

Copy link
Member Author

Choose a reason for hiding this comment

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

If we do it in evaluation I think we'd end up with duplicate entries as the "default" artifacts globbing for packages doesn't take any efforts to avoid Artifact items.

Copy link
Member

@ViktorHofer ViktorHofer Jan 7, 2025

Choose a reason for hiding this comment

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

I see what you mean. I think we should allow to exclude items from the glob when using default artifacts, in these two places:

Something like <ExcludedArtifact Include="$(ArtifactsPackagesDir)**\Microsoft.NETCore.App.Crossgen2.$(NETCoreSdkRuntimeIdentifier).*.nupkg" />

We should rely on Arcade's default artifacts globbing. I imagine that we will add more items to the default globbing list with the ongoing signing work. I expect that we will update Arcade's default globbing list so that it automatically respects all these different artifacts so that we don't have to define them in individual repos like windowsdesktop, aspnetcore, runtime, sdk, etc.

Comment on lines +27 to +32
<!-- Workaround for https://github.com/dotnet/sdk/pull/45566: Ensure that the OS portion of the RID we're building for is part of the RID graph as a separate RID. -->
<PropertyGroup Condition="'$(DotNetBuildSourceOnly)' == 'true'">
<OutputRidOS Condition="$(OutputRID.Contains('-'))">$(OutputRID.Split('-')[0])</OutputRidOS>
<AdditionalRidParentOS Condition="$(AdditionalRuntimeIdentifierParent.Contains('-'))">$(AdditionalRuntimeIdentifierParent.Split('-')[0])</AdditionalRidParentOS>
<AdditionalRidParentOS Condition="!$(AdditionalRuntimeIdentifierParent.Contains('-'))">$(AdditionalRuntimeIdentifierParent)</AdditionalRidParentOS>
</PropertyGroup>
Copy link
Member

Choose a reason for hiding this comment

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

Is the entire property group the workaround? When will we be able to remove this?

Copy link
Member

Choose a reason for hiding this comment

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

Is the L36 (with your changes) also temporary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants