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

Include versions and checksums in VMR publishing and remove prepare-artifacts.proj #100004

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

Conversation

ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented Mar 20, 2024

Fixes dotnet/source-build#4239

Follows the pattern that we established in windowsdesktop: https://github.com/dotnet/windowsdesktop/blob/main/eng/Publishing.props

Important: No Merge until I verified the changes in a runtime official build and a VMR build.

Runtime official build: https://dnceng.visualstudio.com/internal/_build/results?buildId=2414748&view=results

Copy link
Contributor

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

@@ -8,7 +8,7 @@

<PropertyGroup>
<IncrementalNativeBuild Condition="'$(IncrementalNativeBuild)' == ''">true</IncrementalNativeBuild>
<BuildCoreHostDependsOn>GetProductVersions;GenerateRuntimeVersionFile</BuildCoreHostDependsOn>
<BuildCoreHostDependsOn>GenerateRuntimeVersionFile</BuildCoreHostDependsOn>
Copy link
Member Author

Choose a reason for hiding this comment

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

I checked and I couldn't find a place under src/native that still depended on the GetProductVersions target.

Comment on lines -27 to -31
<Target Name="_SetProductVersion" DependsOnTargets="GetProductVersions" BeforeTargets="Pack">
<PropertyGroup>
<PackageVersion>$(ProductVersion)</PackageVersion>
</PropertyGroup>
</Target>
Copy link
Member Author

Choose a reason for hiding this comment

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

From what I could see, this setting shouldn't be necessary as PackageVersion is already automatically set by Arcade.

<ItemGroup>
<_MonoRollupEnvironmentVariable Include="Configuration:$(Configuration)" />
<_MonoRollupEnvironmentVariable Include="NativeBinDir:$(NativeBinDir)" />
<_MonoRollupEnvironmentVariable Include="WasmObjDir:$(WasmObjDir)" />
<_MonoRollupEnvironmentVariable Include="ProductVersion:$(ProductVersion)" />
<_MonoRollupEnvironmentVariable Include="ProductVersion:$(RuntimePackProductVersion)" />
Copy link
Member Author

Choose a reason for hiding this comment

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

Calling into sfxproj to retrieve the version felt safer than just relying on PackageVersion here in case this project sets IsShipping or any other properties already or in the future.

@@ -37,7 +37,6 @@
<Target Name="SetupTestContextVariables"
Condition="'$(IsTestProject)' == 'true'"
DependsOnTargets="
GetProductVersions;
Copy link
Member Author

Choose a reason for hiding this comment

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

I couldn't find any place that still depends on this target or its properties.

Comment on lines -19 to -32
<Target Name="SetTargetBasedPackageVersion"
BeforeTargets="GenerateNuSpec"
DependsOnTargets="GetProductVersions">
<PropertyGroup>
<Version>$(ProductVersion)</Version>
<!--
PackageVersion is normally calculated using Version during static property evaluation, but
we need some info from GetProductVersions, so it's too late to rely on that. We need to set
both in target evaluation, here.
-->
<PackageVersion>$(ProductVersion)</PackageVersion>
</PropertyGroup>
</Target>

Copy link
Member Author

Choose a reason for hiding this comment

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

This might have been necessary in the past but AFAIK, NuGet calculates PackageVersion correctly, even for pkgprojs.

@ViktorHofer ViktorHofer added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Mar 26, 2024
@ViktorHofer ViktorHofer changed the title Include versions and checksums in VMR publishing Include versions and checksums in VMR publishing and remove prepare-artifacts.proj Mar 26, 2024
Copy link
Member

@jkoritzinsky jkoritzinsky left a comment

Choose a reason for hiding this comment

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

Changes LGTM pending a clean official build and VMR build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Infrastructure-libraries NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unify publishing infrastructure in runtime
2 participants