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

Move TargetsCurrent to net9 and add net8 workload #91480

Merged
merged 24 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
229dc86
Move TargetsCurrent to net9 and add net8 workload
lewing Sep 1, 2023
2ab477e
Fix version references
lewing Sep 1, 2023
b675fd7
Update src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.M…
lewing Sep 2, 2023
01b67f4
[wasm] build net8 workload
radical Sep 19, 2023
a484114
Update emsdk
radical Sep 20, 2023
fc607e6
Update current template to reference net9
radical Sep 20, 2023
3e22f75
Bump 8.0 version used for workloads
radical Sep 20, 2023
011ab7c
Fix version for latest emscripten packages
radical Sep 20, 2023
b15e459
fix typo in 8.0 version used for the workload
radical Sep 20, 2023
d1de6b8
disamiguate templates
radical Sep 21, 2023
dc7f720
WBT: explicitly use net8.0 projects for template projects
radical Sep 21, 2023
cf5d460
Update emsdk dependency to get the workload fix
radical Sep 21, 2023
a4149c9
Merge remote-tracking branch 'origin/main' into workload-net8
radical Sep 22, 2023
2ce50d1
fix
radical Sep 22, 2023
54999b0
Add some addtional workarounds for net8
lewing Sep 22, 2023
31c8340
Remove extra character
lewing Sep 22, 2023
703b434
Fix test
radical Sep 22, 2023
f4e1253
More wasi fixes
lewing Sep 22, 2023
20f4d23
Add net8 wasi-wasm runtime pack reference
lewing Sep 25, 2023
d78cb0e
Add wasi-experimental-net8 workload
lewing Sep 25, 2023
c5a9c81
[wasi] Fix use of workload
radical Sep 26, 2023
4e0ed33
[wasm] WBT: Fix test
radical Sep 26, 2023
4977c0a
wasi: Allow wasi-wasm runtimepacks even when targeting net8
radical Sep 26, 2023
93bfe53
fix test
radical Sep 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@
<Sha>89be445dd4936157533ad96bafb95f701430653a</Sha>
<SourceBuild RepoName="cecil" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport" Version="9.0.0-alpha.1.23465.3">
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport" Version="9.0.0-alpha.1.23471.2">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>bebe955e9f7d392fbca594b1c76c54ba2e27027e</Sha>
<Sha>fc01829cbf76b7bbf48a39161562468715a0a3b4</Sha>
<SourceBuild RepoName="emsdk" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="9.0.0-alpha.1.23468.3">
Expand Down
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<MinorVersion>0</MinorVersion>
<PatchVersion>0</PatchVersion>
<SdkBandVersion>9.0.100</SdkBandVersion>
<PackageVersionNet8>8.0.0-rc.1.23414.4</PackageVersionNet8>
<PackageVersionNet8>8.0.0-rc.2.23469.22</PackageVersionNet8>
<PackageVersionNet7>7.0.8</PackageVersionNet7>
<PackageVersionNet6>6.0.$([MSBuild]::Add($([System.Version]::Parse('$(PackageVersionNet7)').Build),11))</PackageVersionNet6>
<PreReleaseVersionLabel>alpha</PreReleaseVersionLabel>
Expand Down Expand Up @@ -236,7 +236,7 @@
Note: when the name is updated, make sure to update dependency name in eng/pipelines/common/xplat-setup.yml
like - DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-8_0_100_Transport
-->
<MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>9.0.0-alpha.1.23465.3</MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>
<MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>9.0.0-alpha.1.23471.2</MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion>
<MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion)</MicrosoftNETRuntimeEmscriptenVersion>
<!-- workloads -->
<SwixPackageVersion>1.1.87-gba258badda</SwixPackageVersion>
Expand Down
7 changes: 6 additions & 1 deletion eng/testing/tests.browser.targets
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@
Variant="latest"
Version="$(PackageVersionForWorkloadManifests)" />

<WorkloadIdForTesting Include="wasm-tools-net8;wasm-experimental-net8"
ManifestName="Microsoft.NET.Workload.Mono.ToolChain.net8"
Variant="net8"
Version="$(PackageVersionForWorkloadManifests)" />

<WorkloadIdForTesting Include="wasm-tools-net7;wasm-experimental-net7"
ManifestName="Microsoft.NET.Workload.Mono.ToolChain.net7"
Variant="net7"
Expand All @@ -277,7 +282,7 @@
IgnoreErrors="$(WasmIgnoreNet6WorkloadInstallErrors)"
Condition="'$(WorkloadsTestPreviousVersions)' == 'true'" />

<WorkloadCombinationsToInstall Include="latest" Variants="latest" />
<WorkloadCombinationsToInstall Include="latest" Variants="latest;net8" />
<WorkloadCombinationsToInstall Include="net7" Variants="net7" Condition="'$(WorkloadsTestPreviousVersions)' == 'true'" />
<WorkloadCombinationsToInstall Include="net7+latest" Variants="net7;latest" Condition="'$(WorkloadsTestPreviousVersions)' == 'true'" />
<!--<WorkloadCombinationsToInstall Include="net6" Variants="net6" />-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
<Project>
<PropertyGroup>
<WasmNativeWorkload Condition="'$(WasmNativeWorkload)' == ''">net8.0</WasmNativeWorkload>
<WasmNativeWorkload8>true</WasmNativeWorkload8>
<WasmNativeWorkload Condition="'$(WasmNativeWorkload)' == ''">net9.0</WasmNativeWorkload>
<WasmNativeWorkload9>true</WasmNativeWorkload9>
<!--<WasmNativeWorkloadAvailableList>$(WasmNativeWorkloadAvailableList)+net8.0+</WasmNativeWorkloadAvailableList>-->
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
<ItemGroup>
<_WorkloadManifestValues Include="WorkloadVersion" Value="$(PackageVersion)" />
<_WorkloadManifestValues Include="PackageVersion" Value="$(PackageVersion)" />
<_WorkloadManifestValues Include="PackageVersionNet8" Value="$(PackageVersionNet8)" Condition="'$(PackageVersionNet8)' != ''" />
<_WorkloadManifestValues Include="PackageVersionNet8" Value="$(PackageVersion)" Condition="'$(PackageVersionNet8)' == ''" />
<_WorkloadManifestValues Include="PackageVersionNet7" Value="$(PackageVersionNet7)" />
<_WorkloadManifestValues Include="PackageVersionNet6" Value="$(PackageVersionNet6)" />
<_WorkloadManifestValues Include="PackageVersionNet7" Value="$(PackageVersionNet7)" Condition="'$(PackageVersionNet7)' != ''" />
<_WorkloadManifestValues Include="PackageVersionNet7" Value="$(PackageVersion)" Condition="'$(PackageVersionNet7)' == ''" />
<_WorkloadManifestValues Include="NetCoreAppCurrent" Value="$(NetCoreAppCurrent)" />
<_WorkloadManifestValues Include="EmscriptenVersion" Value="$(MicrosoftNETRuntimeEmscriptenVersion)" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
<Project>
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'wasi-wasm'">
<WasiNativeWorkloadAvailable Condition="'$(TargetsCurrent)' == 'true' and '$(WasiNativeWorkload)' == 'net8.0'">true</WasiNativeWorkloadAvailable>
<PropertyGroup>
<WasiNativeWorkloadAvailable Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0')) and '$(WasiNativeWorkload)' == 'net8.0'">true</WasiNativeWorkloadAvailable>
<TargetsCurrent Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0'))">true</TargetsCurrent>
</PropertyGroup>

<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'wasi-wasm' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<UsingWasiRuntimeWorkload Condition="'$(UsingWasiRuntimeWorkload)' == ''">$(WasiNativeWorkloadAvailable)</UsingWasiRuntimeWorkload>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"description": ".NET WebAssembly experimental tooling",
"packs": [
"Microsoft.NET.Runtime.WebAssembly.Templates",
"Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm",
"Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm"
],
"extends": [ "wasm-tools" ],
"platforms": [ "win-x64", "win-arm64", "linux-x64", "linux-arm64", "osx-x64", "osx-arm64" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@
<Project>
<PropertyGroup>
<_RuntimePackInWorkloadVersionCurrent>${PackageVersion}</_RuntimePackInWorkloadVersionCurrent>
<_RuntimePackInWorkloadVersion8>${PackageVersionNet8}</_RuntimePackInWorkloadVersion8>
<_RuntimePackInWorkloadVersion7>${PackageVersionNet7}</_RuntimePackInWorkloadVersion7>
<_RuntimePackInWorkloadVersion6>${PackageVersionNet6}</_RuntimePackInWorkloadVersion6>

<TargetsNet9 Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '9.0'))">true</TargetsNet9>
<TargetsNet8 Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '8.0'))">true</TargetsNet8>
<TargetsNet6 Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '6.0'))">true</TargetsNet6>
<TargetsNet7 Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '7.0'))">true</TargetsNet7>
<TargetsCurrent Condition="'$(TargetsNet8)' == 'true'">true</TargetsCurrent>
<TargetsNet6 Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionEquals('$(TargetFrameworkVersion)', '6.0'))">true</TargetsNet6>

<TargetsCurrent Condition="'$(TargetsNet9)' == 'true'">true</TargetsCurrent>

<!-- override WorkloadDetectionWhen net7 == net8 -->
<WasmNativeWorkload7 Condition="'${PackageVersionNet7}' == '${PackageVersion}'">$(WasmNativeWorkload8)</WasmNativeWorkload7>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)WorkloadManifest.Wasi.targets" />
<Import Project="$(MSBuildThisFileDirectory)WorkloadManifest.Wasi.targets" Condition="'$(RuntimeIdentifier)' == 'wasi-wasm'" />

<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<_BrowserWorkloadNotSupportedForTFM Condition="$([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '6.0'))">true</_BrowserWorkloadNotSupportedForTFM>
Expand All @@ -31,8 +34,9 @@

<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm'">
<SelfContained>true</SelfContained>
<WasmNativeWorkloadAvailable Condition="'$(TargetsNet7)' == 'true'">$(WasmNativeWorkload7)</WasmNativeWorkloadAvailable>
<WasmNativeWorkloadAvailable Condition="'$(TargetsNet9)' == 'true'">$(WasmNativeWorkload9)</WasmNativeWorkloadAvailable>
<WasmNativeWorkloadAvailable Condition="'$(TargetsNet8)' == 'true'">$(WasmNativeWorkload8)</WasmNativeWorkloadAvailable>
<WasmNativeWorkloadAvailable Condition="'$(TargetsNet7)' == 'true'">$(WasmNativeWorkload7)</WasmNativeWorkloadAvailable>
<WasmNativeWorkloadAvailable Condition="'$(TargetsNet6)' == 'true'">$(WasmNativeWorkload)</WasmNativeWorkloadAvailable>
<WasmNativeWorkloadAvailable Condition="'$(WasmNativeWorkloadAvailable)' == '' or '$(WasmNativeWorkload)' == 'false'">false</WasmNativeWorkloadAvailable>
<WasmNativeWorkload>$(WasmNativeWorkloadAvailable)</WasmNativeWorkload>
Expand Down Expand Up @@ -141,14 +145,14 @@
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" />
</ImportGroup>

<ImportGroup Condition="'$(TargetsCurrent)' == 'true' and '$(RuntimeIdentifier)' == 'wasi-wasm' and '$(UsingWasiRuntimeWorkload)' == 'true'">
<ImportGroup Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0')) and '$(RuntimeIdentifier)' == 'wasi-wasm' and '$(UsingWasiRuntimeWorkload)' == 'true'">
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" />
</ImportGroup>

<PropertyGroup Condition="'$(TargetsCurrent)' == 'true' and ('$(UsingMobileWorkload)' == 'true' or '$(RuntimeIdentifier)' == 'browser-wasm' or '$(RuntimeIdentifier)' == 'wasi-wasm')">
<PropertyGroup Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0')) and ('$(UsingMobileWorkload)' == 'true' or '$(RuntimeIdentifier)' == 'browser-wasm' or '$(RuntimeIdentifier)' == 'wasi-wasm')">
<_MonoWorkloadTargetsMobile>true</_MonoWorkloadTargetsMobile>
<_MonoWorkloadRuntimePackPackageVersion>$(_RuntimePackInWorkloadVersionCurrent)</_MonoWorkloadRuntimePackPackageVersion>
<_KnownWebAssemblySdkPackVersion>$(_RuntimePackInWorkloadVersionCurrent)</_KnownWebAssemblySdkPackVersion>
Expand All @@ -163,7 +167,16 @@
<SdkSupportedTargetPlatformVersion Include="1.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetsCurrent)' == 'true' and '$(_MonoWorkloadTargetsMobile)' == 'true'">
<!-- Support for "wasi" target platform identifier -->
<PropertyGroup Condition="'$(TargetPlatformIdentifier)' == 'wasi' and $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0'))">
<TargetPlatformSupported>true</TargetPlatformSupported>
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">1.0</TargetPlatformVersion>
</PropertyGroup>
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'wasi' and $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0'))">
<SdkSupportedTargetPlatformVersion Include="1.0" />
</ItemGroup>

<ItemGroup Condition="(('$(RuntimeIdentifier)' == 'wasi-wasm' and '$(TargetsNet8)' == 'true') or '$(TargetsCurrent)' == 'true') and '$(_MonoWorkloadTargetsMobile)' == 'true'">
<KnownRuntimePack Update="@(KnownRuntimePack)">
<!-- FIXMEWASI: workaround for now -->
<RuntimePackRuntimeIdentifiers Condition="'$(RuntimeIdentifier)' == 'wasi-wasm'">%(RuntimePackRuntimeIdentifiers);wasi-wasm</RuntimePackRuntimeIdentifiers>
Expand Down Expand Up @@ -212,6 +225,6 @@
Importance="High" />
</Target>

<Import Condition="'$(TargetsCurrent)' == 'true' and ('$(UsingBrowserRuntimeWorkload)' == 'true' or '$(UsingMobileWorkload)' == 'true')"
<Import Condition="$([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '8.0')) and ('$(UsingBrowserRuntimeWorkload)' == 'true' or '$(UsingMobileWorkload)' == 'true')"
Project="$(MSBuildThisFileDirectory)WorkloadTelemetry.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<Project DefaultTargets="Build">
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<PropertyGroup>
<PackageDescription>Internal toolchain package not meant for direct consumption. Please do not reference directly.</PackageDescription>
</PropertyGroup>

<Target Name="_PrepareForPack" BeforeTargets="GetPackageFiles" Returns="@(PackageFile)">
<Error Condition="'$(SdkBandVersionForWorkload_FromRuntimeVersions)' == ''"
Text="%24(SdkBandVersionForWorkload_FromRuntimeVersions) is not set" />

<!-- Override the id to include the sdk band as per the workload installer spec -->
<PropertyGroup>
<Id>Microsoft.NET.Workload.Mono.ToolChain.net8.Manifest-$(SdkBandVersionForWorkload_FromRuntimeVersions)</Id>
</PropertyGroup>

<PropertyGroup>
<WorkloadManifestPath>$(IntermediateOutputPath)WorkloadManifest.json</WorkloadManifestPath>
<WorkloadManifestTargetsPath>$(IntermediateOutputPath)WorkloadManifest.targets</WorkloadManifestTargetsPath>
</PropertyGroup>

<ItemGroup>
<PackageFile Include="$(WorkloadManifestPath)" TargetPath="data" />
<PackageFile Include="$(WorkloadManifestTargetsPath)" TargetPath="data" />
</ItemGroup>

<ItemGroup>
<File Include="localize/**/*">
<TargetPath>data/localize</TargetPath>
</File>
</ItemGroup>
</Target>

<!-- Running this target ensures we have the fully evaluated PackageVersion -->
<Target Name="_WriteManifestValues" AfterTargets="CalculatePackageVersion">
<PropertyGroup>
<PackagePathVersion>PackageVersion=$(PackageVersion);</PackagePathVersion>
</PropertyGroup>

<ItemGroup>
<_WorkloadManifestValues Include="WorkloadVersion" Value="$(PackageVersion)" />
<_WorkloadManifestValues Include="PackageVersionNet8" Value="$(PackageVersionNet8)" Condition="'$(PackageVersionNet8)' != ''" />
<_WorkloadManifestValues Include="PackageVersionNet8" Value="$(PackageVersion)" Condition="'$(PackageVersionNet8)' == ''" />
<_WorkloadManifestValues Include="EmscriptenVersion" Value="$(MicrosoftNETRuntimeEmscriptenVersion)" />
<_WorkloadManifestValues Include="NetCoreAppCurrent" Value="$(NetCoreAppCurrent)" />
</ItemGroup>

<Error Condition="'%(_WorkloadManifestValues.Value)' == ''"
Text="No version specified for template variable '%(_WorkloadManifestValues.Identity)'" />

<GenerateFileFromTemplate
TemplateFile="WorkloadManifest.json.in"
Properties="@(_WorkloadManifestValues)"
OutputPath="$(WorkloadManifestPath)" />

<GenerateFileFromTemplate
TemplateFile="WorkloadManifest.targets.in"
Properties="@(_WorkloadManifestValues)"
OutputPath="$(WorkloadManifestTargetsPath)" />
</Target>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
</Project>
Loading
Loading