Skip to content

[main] Update dotnet/runtime - #35048

Merged
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest
Sep 20, 2023
Merged

[main] Update dotnet/runtime#35048
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest

Conversation

@lewing

@lewinglewing commented Aug 30, 2023

Copy link
Copy Markdown
Member

Fix the 9.0.100 band in the emsdk transport package name

@lewing

Copy link
Copy Markdown
MemberAuthor

this may need additional tweaks to deal with the band versioning

@lewing
lewing requested a review from agockeAugust 30, 2023 17:54
Comment threadeng/Versions.props Outdated
@lewing

Copy link
Copy Markdown
MemberAuthor

Installer needs a bunch of updates as well once this lands

@ghostghost added the untriaged Request triage from a team member label Aug 30, 2023
@jeffschwMSFT

Copy link
Copy Markdown
Member

who is on point to either identifying the individual failures and farming out the work and/or handling them?

@mmitche

Copy link
Copy Markdown
Member

@jeffschwMSFT There shouldn't be too much. This was the commit to switch to 8: 8119940

@lewing

Copy link
Copy Markdown
MemberAuthor

opened dotnet/arcade#14002 for future me

@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like it is failing on rid resolution now @elinor-fung can you take a look?

@elinor-fung

Copy link
Copy Markdown
Member

The built tests are configured to run on a runtime from before dotnet/docs#36466 for some reason.

If I build main, the runtimeconfig for the Microsoft.NET.Build.Tests has the runtime version corresponding to Version.props/Version.Details.xml:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-rc.1.23421.3"
},

But from this branch, it has:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-preview.7.23375.6"
},

I'm not sure why yet - cc @dsplaisted in case it is something obvious to you

@elinor-fung

Copy link
Copy Markdown
Member

This is what does the updating to the runtime version that gets used by tests:

<!-- Update KnownFrameworkReferences to target the right version of the runtime -->
<ItemGroupCondition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))
and '$(MSBuildProjectName)' != 'toolset-tasks'">
<FrameworkReference
Update="Microsoft.NETCore.App"
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
</ItemGroup>

But with this PR, $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)')) is false:

  • MicrosoftNETCoreAppRefPackageVersion is 9.0.0-alpha.1.23430.1
  • _TargetFrameworkVersionWithoutV is 8.0

@elinor-fung

Copy link
Copy Markdown
Member

@dsplaisted / @marcpopMSFT how does SDK usually handle updating major versions and targeting the consumed runtime version?

The retargeting for ASP.NET references has a similar condition:

<ItemGroupCondition="$(MicrosoftAspNetCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))">
<KnownFrameworkReferenceUpdate="Microsoft.AspNetCore.App">
<LatestRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
<RuntimePackRuntimeIdentifiers>${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers>
<TargetingPackVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</TargetingPackVersion>
<DefaultRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</DefaultRuntimeFrameworkVersion>
</KnownFrameworkReference>
</ItemGroup>

@v-wuzhai
v-wuzhai requested a review from a team as a code ownerAugust 31, 2023 10:24
@dsplaisted

Copy link
Copy Markdown
Member

Now that the dependency flow is bringing in .NET 9 instead of .NET 8, the build doesn't have a version of .NET 8 to update the targeting to. I think the thing to do here is to update the stage 0 SDK to one that has a recent enough version of the runtime.

FYI for those not aware, here is where we are trying to keep track of the changes needed each time we update to a new TargetFramework: https://github.com/dotnet/sdk/blob/main/documentation/general/UpdateToNewTargetFramework.md Feel free to update it as appropriate.

@lewing

lewing commented Sep 2, 2023

Copy link
Copy Markdown
MemberAuthor

@ViktorHofer @dotnet/domestic-cat please take a look

Comment on lines +61 to 78
var originalBundledNETCoreAppPackageVersion = propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value;
var parsedOriginalBundledPackageVersion = SemanticVersion.Parse(originalBundledNETCoreAppPackageVersion);
var parsedMicrosoftNETCoreAppRefPackageVersion =
SemanticVersion.Parse(microsoftNETCoreAppRefPackageVersion);

// In the case where we have a new major version, it'll come in first through the dotnet/runtime flow of the
// SDK's own package references. The Stage0 SDK's bundled version props file will still be on the older major version
// (and the older TFM that goes along with that). If we just replaced the bundled version with the new major version,
// apps that target the 'older' TFM would fail to build. So we need to keep the bundled version from the existing
// bundledversions.props in this one specific case.

var newBundledPackageVersion =
parsedOriginalBundledPackageVersion.Major == parsedMicrosoftNETCoreAppRefPackageVersion.Major
? microsoftNETCoreAppRefPackageVersion
: originalBundledNETCoreAppPackageVersion;

propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value = newBundledPackageVersion;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@dsplaisted would you mind double-checking this and seeing if it matched what you were talking about?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, this matches what I expected. It might be better to use NuGetVersion instead of SemanticVersion. I'm not too sure of the differences between them, but the code I've seen has used NuGetVersion.

@marcpopMSFT

Copy link
Copy Markdown
Member

latest change has us down to 34 test failures. @dotnet/source-build-internal @agocke@sbomer

  1. Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.WasmAoTPublishIntegrationTest.AoT_Publish_WithExistingWebConfig_Works
    emcc : error : C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory ("C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a" was expected to be an input file, based on the commandline arguments provided) [C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\AoT_Publish_W---DA56BF44\blazorwasm\blazorwasm.csproj]
  2. Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled
    Expected command to fail but it did not.
  3. Source build is flagging the 8.0 downgrades I checked in to fix the System.Text.Json failure. Not sure what to do about this as it's meant to be temporary
Package IDs are:
Microsoft.Bcl.AsyncInterfaces.8.0.0-rc.1.23414.4
Microsoft.Extensions.DependencyModel.8.0.0-rc.1.23414.4
Microsoft.NET.HostModel.8.0.0-rc.1.23414.4```
There are a few other individual tests failures are unbuntu it looks like that also need to be looked into.

@elinor-fung

Copy link
Copy Markdown
Member

Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled

Microsoft.DotNet.ILCompiler being used is now 8.0.0-rc.1.23414.4 - which is from before dotnet/runtime#90811 (main is using 8.0.0-rc.1.23421.3). Maybe related to the BundledVersions changes in this PR?

Side note: not the issue being hit in this PR, but that error is also being downgraded to a warning (dotnet/runtime#91715), so the test will also need to be updated when that change flows over.

@lewing

Copy link
Copy Markdown
MemberAuthor

I've updated the runtime flow to the most recent build. The wasm build is odd @maraf and @radical can you please take a look.

@elinor-fung

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

Maybe the wasm error is the same as root cause as the native aot one - seems like the test environment gets constructed such that it is using older packages. As with Microsoft.DotNet.ILCompiler, the version of Microsoft.NETCore.App.Runtime.Mono.browser-wasm being used is an older version - 8.0.0-rc.1.23414.4 - which is before libmono-wasm-simd.a was added.

@radical

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

This is because 9.0 targets are being used with a 8.0 runtime pack. I'm trying to reproduce this locally now.

The tests fail with:
```
emcc : error : /private/tmp/helix/working/A19408C3/w/B54A09BA/e/testExecutionDirectory/.nuget/packages/microsoft.netcore.app.runtime.mono.browser-wasm/8.0.0-rc.1.23414.4/runtimes/browser-wasm/native/libmono-wasm-simd.a: No such file or directory
```
.. because the build is using 9.0 targets, but 8.0 runtime pack.
This commit works around that issue by overriding the runtime pack path
to point to the correct one. `WasmOverridePacks.targets` is taken from
`Wasm.Build.Tests` in `dotnet/runtime`.
This workaround can be removed once we have a proper 9.0 workload.
@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like we are down to NativeAOT publish failures now?

@marek-safar

Copy link
Copy Markdown
Contributor

@sbomer@LakshanF could you help with resolving tests failures in AotStaticLibraryPublishWithEventPipe ?

@marek-safar

Copy link
Copy Markdown
Contributor

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

Comment threadeng/Version.Details.xml Outdated
</Dependency>
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="8.0.0-rc.1.23421.3">
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1">
<Uri>https://github.com/dotnet/runtime</Uri>

@MichaelSimonsMichaelSimonsSep 19, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this intentionally incoherent with the other runtime dependencies? They are on version 9.0.0-alpha.1.23464.19 and sha a6c64c3c26417f579022e20cbcee992b4814ed2c. This is the source of the following source-build prebuilts that are being reported:

 <Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" IsDirectDependency="true" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" IsDirectDependency="true" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We actually removed Microsoft.NETCore.DotNetHostResolver in runtime. It looks like this repo is using it to grab hostfxr for Framework builds. I think it can use Microsoft.NETCore.App.Runtime.* packages - I'll take a look.

@MichaelSimons

Copy link
Copy Markdown
Member

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

I took a quick look. Here is what I did:

  1. Reviewed the prebuilt baseline-comparison.xml.
  2. Noted two classes of prebuilts as they come from two different project groupings.
  3. First grouping is from src/artifacts/obj/Release/Sdks/Microsoft.NET.Sdk/tools/project.assets.json which when looking at the changes led me to this conclusion.
  4. Second grouping is from src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json and src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json which led me to review the version of the referenced prebuilts in the versions.props and version.details.xml and noticed this incoherency.

@elinor-fung

Copy link
Copy Markdown
Member

Second grouping from Microsoft.DotNet.MSBuildSdkResolver / Microsoft.DotNet.SdkResolver is resolved.

#35048 (comment) is all that is left.

@lewing

Copy link
Copy Markdown
MemberAuthor

@marcpopMSFT ping

@marcpopMSFT
marcpopMSFT merged commit 1bdc5a5 into mainSep 20, 2023
@marcpopMSFT
marcpopMSFT deleted the update-emsdk-manifest branch September 20, 2023 06:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-CodeFlowuntriagedRequest triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

18 participants

@lewing@jeffschwMSFT@mmitche@elinor-fung@dsplaisted@ViktorHofer@agocke@nagilson@marcpopMSFT@baronfel@vitek-karas@radical@marek-safar@MichaelSimons@joeloff@hoyosjs@LakshanF@mthalman
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
[main] Update dotnet/runtime by lewing · Pull Request #35048 · dotnet/sdk · GitHub
Skip to content

[main] Update dotnet/runtime - #35048

Merged
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest
Sep 20, 2023
Merged

[main] Update dotnet/runtime#35048
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest

Conversation

@lewing

@lewinglewing commented Aug 30, 2023

Copy link
Copy Markdown
Member

Fix the 9.0.100 band in the emsdk transport package name

@lewing

Copy link
Copy Markdown
MemberAuthor

this may need additional tweaks to deal with the band versioning

@lewing
lewing requested a review from agockeAugust 30, 2023 17:54
Comment threadeng/Versions.props Outdated
@lewing

Copy link
Copy Markdown
MemberAuthor

Installer needs a bunch of updates as well once this lands

@ghostghost added the untriaged Request triage from a team member label Aug 30, 2023
@jeffschwMSFT

Copy link
Copy Markdown
Member

who is on point to either identifying the individual failures and farming out the work and/or handling them?

@mmitche

Copy link
Copy Markdown
Member

@jeffschwMSFT There shouldn't be too much. This was the commit to switch to 8: 8119940

@lewing

Copy link
Copy Markdown
MemberAuthor

opened dotnet/arcade#14002 for future me

@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like it is failing on rid resolution now @elinor-fung can you take a look?

@elinor-fung

Copy link
Copy Markdown
Member

The built tests are configured to run on a runtime from before dotnet/docs#36466 for some reason.

If I build main, the runtimeconfig for the Microsoft.NET.Build.Tests has the runtime version corresponding to Version.props/Version.Details.xml:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-rc.1.23421.3"
},

But from this branch, it has:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-preview.7.23375.6"
},

I'm not sure why yet - cc @dsplaisted in case it is something obvious to you

@elinor-fung

Copy link
Copy Markdown
Member

This is what does the updating to the runtime version that gets used by tests:

<!-- Update KnownFrameworkReferences to target the right version of the runtime -->
<ItemGroupCondition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))
and '$(MSBuildProjectName)' != 'toolset-tasks'">
<FrameworkReference
Update="Microsoft.NETCore.App"
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
</ItemGroup>

But with this PR, $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)')) is false:

  • MicrosoftNETCoreAppRefPackageVersion is 9.0.0-alpha.1.23430.1
  • _TargetFrameworkVersionWithoutV is 8.0

@elinor-fung

Copy link
Copy Markdown
Member

@dsplaisted / @marcpopMSFT how does SDK usually handle updating major versions and targeting the consumed runtime version?

The retargeting for ASP.NET references has a similar condition:

<ItemGroupCondition="$(MicrosoftAspNetCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))">
<KnownFrameworkReferenceUpdate="Microsoft.AspNetCore.App">
<LatestRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
<RuntimePackRuntimeIdentifiers>${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers>
<TargetingPackVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</TargetingPackVersion>
<DefaultRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</DefaultRuntimeFrameworkVersion>
</KnownFrameworkReference>
</ItemGroup>

@v-wuzhai
v-wuzhai requested a review from a team as a code ownerAugust 31, 2023 10:24
@dsplaisted

Copy link
Copy Markdown
Member

Now that the dependency flow is bringing in .NET 9 instead of .NET 8, the build doesn't have a version of .NET 8 to update the targeting to. I think the thing to do here is to update the stage 0 SDK to one that has a recent enough version of the runtime.

FYI for those not aware, here is where we are trying to keep track of the changes needed each time we update to a new TargetFramework: https://github.com/dotnet/sdk/blob/main/documentation/general/UpdateToNewTargetFramework.md Feel free to update it as appropriate.

@lewing

lewing commented Sep 2, 2023

Copy link
Copy Markdown
MemberAuthor

@ViktorHofer @dotnet/domestic-cat please take a look

Comment on lines +61 to 78
var originalBundledNETCoreAppPackageVersion = propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value;
var parsedOriginalBundledPackageVersion = SemanticVersion.Parse(originalBundledNETCoreAppPackageVersion);
var parsedMicrosoftNETCoreAppRefPackageVersion =
SemanticVersion.Parse(microsoftNETCoreAppRefPackageVersion);

// In the case where we have a new major version, it'll come in first through the dotnet/runtime flow of the
// SDK's own package references. The Stage0 SDK's bundled version props file will still be on the older major version
// (and the older TFM that goes along with that). If we just replaced the bundled version with the new major version,
// apps that target the 'older' TFM would fail to build. So we need to keep the bundled version from the existing
// bundledversions.props in this one specific case.

var newBundledPackageVersion =
parsedOriginalBundledPackageVersion.Major == parsedMicrosoftNETCoreAppRefPackageVersion.Major
? microsoftNETCoreAppRefPackageVersion
: originalBundledNETCoreAppPackageVersion;

propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value = newBundledPackageVersion;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@dsplaisted would you mind double-checking this and seeing if it matched what you were talking about?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, this matches what I expected. It might be better to use NuGetVersion instead of SemanticVersion. I'm not too sure of the differences between them, but the code I've seen has used NuGetVersion.

@marcpopMSFT

Copy link
Copy Markdown
Member

latest change has us down to 34 test failures. @dotnet/source-build-internal @agocke@sbomer

  1. Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.WasmAoTPublishIntegrationTest.AoT_Publish_WithExistingWebConfig_Works
    emcc : error : C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory ("C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a" was expected to be an input file, based on the commandline arguments provided) [C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\AoT_Publish_W---DA56BF44\blazorwasm\blazorwasm.csproj]
  2. Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled
    Expected command to fail but it did not.
  3. Source build is flagging the 8.0 downgrades I checked in to fix the System.Text.Json failure. Not sure what to do about this as it's meant to be temporary
Package IDs are:
Microsoft.Bcl.AsyncInterfaces.8.0.0-rc.1.23414.4
Microsoft.Extensions.DependencyModel.8.0.0-rc.1.23414.4
Microsoft.NET.HostModel.8.0.0-rc.1.23414.4```
There are a few other individual tests failures are unbuntu it looks like that also need to be looked into.

@elinor-fung

Copy link
Copy Markdown
Member

Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled

Microsoft.DotNet.ILCompiler being used is now 8.0.0-rc.1.23414.4 - which is from before dotnet/runtime#90811 (main is using 8.0.0-rc.1.23421.3). Maybe related to the BundledVersions changes in this PR?

Side note: not the issue being hit in this PR, but that error is also being downgraded to a warning (dotnet/runtime#91715), so the test will also need to be updated when that change flows over.

@lewing

Copy link
Copy Markdown
MemberAuthor

I've updated the runtime flow to the most recent build. The wasm build is odd @maraf and @radical can you please take a look.

@elinor-fung

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

Maybe the wasm error is the same as root cause as the native aot one - seems like the test environment gets constructed such that it is using older packages. As with Microsoft.DotNet.ILCompiler, the version of Microsoft.NETCore.App.Runtime.Mono.browser-wasm being used is an older version - 8.0.0-rc.1.23414.4 - which is before libmono-wasm-simd.a was added.

@radical

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

This is because 9.0 targets are being used with a 8.0 runtime pack. I'm trying to reproduce this locally now.

The tests fail with:
```
emcc : error : /private/tmp/helix/working/A19408C3/w/B54A09BA/e/testExecutionDirectory/.nuget/packages/microsoft.netcore.app.runtime.mono.browser-wasm/8.0.0-rc.1.23414.4/runtimes/browser-wasm/native/libmono-wasm-simd.a: No such file or directory
```
.. because the build is using 9.0 targets, but 8.0 runtime pack.
This commit works around that issue by overriding the runtime pack path
to point to the correct one. `WasmOverridePacks.targets` is taken from
`Wasm.Build.Tests` in `dotnet/runtime`.
This workaround can be removed once we have a proper 9.0 workload.
@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like we are down to NativeAOT publish failures now?

@marek-safar

Copy link
Copy Markdown
Contributor

@sbomer@LakshanF could you help with resolving tests failures in AotStaticLibraryPublishWithEventPipe ?

@marek-safar

Copy link
Copy Markdown
Contributor

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

Comment threadeng/Version.Details.xml Outdated
</Dependency>
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="8.0.0-rc.1.23421.3">
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1">
<Uri>https://github.com/dotnet/runtime</Uri>

@MichaelSimonsMichaelSimonsSep 19, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this intentionally incoherent with the other runtime dependencies? They are on version 9.0.0-alpha.1.23464.19 and sha a6c64c3c26417f579022e20cbcee992b4814ed2c. This is the source of the following source-build prebuilts that are being reported:

 <Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" IsDirectDependency="true" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" IsDirectDependency="true" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We actually removed Microsoft.NETCore.DotNetHostResolver in runtime. It looks like this repo is using it to grab hostfxr for Framework builds. I think it can use Microsoft.NETCore.App.Runtime.* packages - I'll take a look.

@MichaelSimons

Copy link
Copy Markdown
Member

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

I took a quick look. Here is what I did:

  1. Reviewed the prebuilt baseline-comparison.xml.
  2. Noted two classes of prebuilts as they come from two different project groupings.
  3. First grouping is from src/artifacts/obj/Release/Sdks/Microsoft.NET.Sdk/tools/project.assets.json which when looking at the changes led me to this conclusion.
  4. Second grouping is from src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json and src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json which led me to review the version of the referenced prebuilts in the versions.props and version.details.xml and noticed this incoherency.

@elinor-fung

Copy link
Copy Markdown
Member

Second grouping from Microsoft.DotNet.MSBuildSdkResolver / Microsoft.DotNet.SdkResolver is resolved.

#35048 (comment) is all that is left.

@lewing

Copy link
Copy Markdown
MemberAuthor

@marcpopMSFT ping

@marcpopMSFT
marcpopMSFT merged commit 1bdc5a5 into mainSep 20, 2023
@marcpopMSFT
marcpopMSFT deleted the update-emsdk-manifest branch September 20, 2023 06:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-CodeFlowuntriagedRequest triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

18 participants

@lewing@jeffschwMSFT@mmitche@elinor-fung@dsplaisted@ViktorHofer@agocke@nagilson@marcpopMSFT@baronfel@vitek-karas@radical@marek-safar@MichaelSimons@joeloff@hoyosjs@LakshanF@mthalman
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' [main] Update dotnet/runtime by lewing · Pull Request #35048 · dotnet/sdk · GitHub
Skip to content

[main] Update dotnet/runtime - #35048

Merged
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest
Sep 20, 2023
Merged

[main] Update dotnet/runtime#35048
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest

Conversation

@lewing

@lewinglewing commented Aug 30, 2023

Copy link
Copy Markdown
Member

Fix the 9.0.100 band in the emsdk transport package name

@lewing

Copy link
Copy Markdown
MemberAuthor

this may need additional tweaks to deal with the band versioning

@lewing
lewing requested a review from agockeAugust 30, 2023 17:54
Comment threadeng/Versions.props Outdated
@lewing

Copy link
Copy Markdown
MemberAuthor

Installer needs a bunch of updates as well once this lands

@ghostghost added the untriaged Request triage from a team member label Aug 30, 2023
@jeffschwMSFT

Copy link
Copy Markdown
Member

who is on point to either identifying the individual failures and farming out the work and/or handling them?

@mmitche

Copy link
Copy Markdown
Member

@jeffschwMSFT There shouldn't be too much. This was the commit to switch to 8: 8119940

@lewing

Copy link
Copy Markdown
MemberAuthor

opened dotnet/arcade#14002 for future me

@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like it is failing on rid resolution now @elinor-fung can you take a look?

@elinor-fung

Copy link
Copy Markdown
Member

The built tests are configured to run on a runtime from before dotnet/docs#36466 for some reason.

If I build main, the runtimeconfig for the Microsoft.NET.Build.Tests has the runtime version corresponding to Version.props/Version.Details.xml:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-rc.1.23421.3"
},

But from this branch, it has:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-preview.7.23375.6"
},

I'm not sure why yet - cc @dsplaisted in case it is something obvious to you

@elinor-fung

Copy link
Copy Markdown
Member

This is what does the updating to the runtime version that gets used by tests:

<!-- Update KnownFrameworkReferences to target the right version of the runtime -->
<ItemGroupCondition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))
and '$(MSBuildProjectName)' != 'toolset-tasks'">
<FrameworkReference
Update="Microsoft.NETCore.App"
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
</ItemGroup>

But with this PR, $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)')) is false:

  • MicrosoftNETCoreAppRefPackageVersion is 9.0.0-alpha.1.23430.1
  • _TargetFrameworkVersionWithoutV is 8.0

@elinor-fung

Copy link
Copy Markdown
Member

@dsplaisted / @marcpopMSFT how does SDK usually handle updating major versions and targeting the consumed runtime version?

The retargeting for ASP.NET references has a similar condition:

<ItemGroupCondition="$(MicrosoftAspNetCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))">
<KnownFrameworkReferenceUpdate="Microsoft.AspNetCore.App">
<LatestRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
<RuntimePackRuntimeIdentifiers>${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers>
<TargetingPackVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</TargetingPackVersion>
<DefaultRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</DefaultRuntimeFrameworkVersion>
</KnownFrameworkReference>
</ItemGroup>

@v-wuzhai
v-wuzhai requested a review from a team as a code ownerAugust 31, 2023 10:24
@dsplaisted

Copy link
Copy Markdown
Member

Now that the dependency flow is bringing in .NET 9 instead of .NET 8, the build doesn't have a version of .NET 8 to update the targeting to. I think the thing to do here is to update the stage 0 SDK to one that has a recent enough version of the runtime.

FYI for those not aware, here is where we are trying to keep track of the changes needed each time we update to a new TargetFramework: https://github.com/dotnet/sdk/blob/main/documentation/general/UpdateToNewTargetFramework.md Feel free to update it as appropriate.

@lewing

lewing commented Sep 2, 2023

Copy link
Copy Markdown
MemberAuthor

@ViktorHofer @dotnet/domestic-cat please take a look

Comment on lines +61 to 78
var originalBundledNETCoreAppPackageVersion = propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value;
var parsedOriginalBundledPackageVersion = SemanticVersion.Parse(originalBundledNETCoreAppPackageVersion);
var parsedMicrosoftNETCoreAppRefPackageVersion =
SemanticVersion.Parse(microsoftNETCoreAppRefPackageVersion);

// In the case where we have a new major version, it'll come in first through the dotnet/runtime flow of the
// SDK's own package references. The Stage0 SDK's bundled version props file will still be on the older major version
// (and the older TFM that goes along with that). If we just replaced the bundled version with the new major version,
// apps that target the 'older' TFM would fail to build. So we need to keep the bundled version from the existing
// bundledversions.props in this one specific case.

var newBundledPackageVersion =
parsedOriginalBundledPackageVersion.Major == parsedMicrosoftNETCoreAppRefPackageVersion.Major
? microsoftNETCoreAppRefPackageVersion
: originalBundledNETCoreAppPackageVersion;

propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value = newBundledPackageVersion;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@dsplaisted would you mind double-checking this and seeing if it matched what you were talking about?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, this matches what I expected. It might be better to use NuGetVersion instead of SemanticVersion. I'm not too sure of the differences between them, but the code I've seen has used NuGetVersion.

@marcpopMSFT

Copy link
Copy Markdown
Member

latest change has us down to 34 test failures. @dotnet/source-build-internal @agocke@sbomer

  1. Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.WasmAoTPublishIntegrationTest.AoT_Publish_WithExistingWebConfig_Works
    emcc : error : C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory ("C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a" was expected to be an input file, based on the commandline arguments provided) [C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\AoT_Publish_W---DA56BF44\blazorwasm\blazorwasm.csproj]
  2. Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled
    Expected command to fail but it did not.
  3. Source build is flagging the 8.0 downgrades I checked in to fix the System.Text.Json failure. Not sure what to do about this as it's meant to be temporary
Package IDs are:
Microsoft.Bcl.AsyncInterfaces.8.0.0-rc.1.23414.4
Microsoft.Extensions.DependencyModel.8.0.0-rc.1.23414.4
Microsoft.NET.HostModel.8.0.0-rc.1.23414.4```
There are a few other individual tests failures are unbuntu it looks like that also need to be looked into.

@elinor-fung

Copy link
Copy Markdown
Member

Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled

Microsoft.DotNet.ILCompiler being used is now 8.0.0-rc.1.23414.4 - which is from before dotnet/runtime#90811 (main is using 8.0.0-rc.1.23421.3). Maybe related to the BundledVersions changes in this PR?

Side note: not the issue being hit in this PR, but that error is also being downgraded to a warning (dotnet/runtime#91715), so the test will also need to be updated when that change flows over.

@lewing

Copy link
Copy Markdown
MemberAuthor

I've updated the runtime flow to the most recent build. The wasm build is odd @maraf and @radical can you please take a look.

@elinor-fung

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

Maybe the wasm error is the same as root cause as the native aot one - seems like the test environment gets constructed such that it is using older packages. As with Microsoft.DotNet.ILCompiler, the version of Microsoft.NETCore.App.Runtime.Mono.browser-wasm being used is an older version - 8.0.0-rc.1.23414.4 - which is before libmono-wasm-simd.a was added.

@radical

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

This is because 9.0 targets are being used with a 8.0 runtime pack. I'm trying to reproduce this locally now.

The tests fail with:
```
emcc : error : /private/tmp/helix/working/A19408C3/w/B54A09BA/e/testExecutionDirectory/.nuget/packages/microsoft.netcore.app.runtime.mono.browser-wasm/8.0.0-rc.1.23414.4/runtimes/browser-wasm/native/libmono-wasm-simd.a: No such file or directory
```
.. because the build is using 9.0 targets, but 8.0 runtime pack.
This commit works around that issue by overriding the runtime pack path
to point to the correct one. `WasmOverridePacks.targets` is taken from
`Wasm.Build.Tests` in `dotnet/runtime`.
This workaround can be removed once we have a proper 9.0 workload.
@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like we are down to NativeAOT publish failures now?

@marek-safar

Copy link
Copy Markdown
Contributor

@sbomer@LakshanF could you help with resolving tests failures in AotStaticLibraryPublishWithEventPipe ?

@marek-safar

Copy link
Copy Markdown
Contributor

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

Comment threadeng/Version.Details.xml Outdated
</Dependency>
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="8.0.0-rc.1.23421.3">
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1">
<Uri>https://github.com/dotnet/runtime</Uri>

@MichaelSimonsMichaelSimonsSep 19, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this intentionally incoherent with the other runtime dependencies? They are on version 9.0.0-alpha.1.23464.19 and sha a6c64c3c26417f579022e20cbcee992b4814ed2c. This is the source of the following source-build prebuilts that are being reported:

 <Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" IsDirectDependency="true" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" IsDirectDependency="true" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We actually removed Microsoft.NETCore.DotNetHostResolver in runtime. It looks like this repo is using it to grab hostfxr for Framework builds. I think it can use Microsoft.NETCore.App.Runtime.* packages - I'll take a look.

@MichaelSimons

Copy link
Copy Markdown
Member

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

I took a quick look. Here is what I did:

  1. Reviewed the prebuilt baseline-comparison.xml.
  2. Noted two classes of prebuilts as they come from two different project groupings.
  3. First grouping is from src/artifacts/obj/Release/Sdks/Microsoft.NET.Sdk/tools/project.assets.json which when looking at the changes led me to this conclusion.
  4. Second grouping is from src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json and src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json which led me to review the version of the referenced prebuilts in the versions.props and version.details.xml and noticed this incoherency.

@elinor-fung

Copy link
Copy Markdown
Member

Second grouping from Microsoft.DotNet.MSBuildSdkResolver / Microsoft.DotNet.SdkResolver is resolved.

#35048 (comment) is all that is left.

@lewing

Copy link
Copy Markdown
MemberAuthor

@marcpopMSFT ping

@marcpopMSFT
marcpopMSFT merged commit 1bdc5a5 into mainSep 20, 2023
@marcpopMSFT
marcpopMSFT deleted the update-emsdk-manifest branch September 20, 2023 06:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-CodeFlowuntriagedRequest triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

18 participants

@lewing@jeffschwMSFT@mmitche@elinor-fung@dsplaisted@ViktorHofer@agocke@nagilson@marcpopMSFT@baronfel@vitek-karas@radical@marek-safar@MichaelSimons@joeloff@hoyosjs@LakshanF@mthalman
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' [main] Update dotnet/runtime by lewing · Pull Request #35048 · dotnet/sdk · GitHub
Skip to content

[main] Update dotnet/runtime - #35048

Merged
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest
Sep 20, 2023
Merged

[main] Update dotnet/runtime#35048
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest

Conversation

@lewing

@lewinglewing commented Aug 30, 2023

Copy link
Copy Markdown
Member

Fix the 9.0.100 band in the emsdk transport package name

@lewing

Copy link
Copy Markdown
MemberAuthor

this may need additional tweaks to deal with the band versioning

@lewing
lewing requested a review from agockeAugust 30, 2023 17:54
Comment threadeng/Versions.props Outdated
@lewing

Copy link
Copy Markdown
MemberAuthor

Installer needs a bunch of updates as well once this lands

@ghostghost added the untriaged Request triage from a team member label Aug 30, 2023
@jeffschwMSFT

Copy link
Copy Markdown
Member

who is on point to either identifying the individual failures and farming out the work and/or handling them?

@mmitche

Copy link
Copy Markdown
Member

@jeffschwMSFT There shouldn't be too much. This was the commit to switch to 8: 8119940

@lewing

Copy link
Copy Markdown
MemberAuthor

opened dotnet/arcade#14002 for future me

@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like it is failing on rid resolution now @elinor-fung can you take a look?

@elinor-fung

Copy link
Copy Markdown
Member

The built tests are configured to run on a runtime from before dotnet/docs#36466 for some reason.

If I build main, the runtimeconfig for the Microsoft.NET.Build.Tests has the runtime version corresponding to Version.props/Version.Details.xml:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-rc.1.23421.3"
},

But from this branch, it has:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-preview.7.23375.6"
},

I'm not sure why yet - cc @dsplaisted in case it is something obvious to you

@elinor-fung

Copy link
Copy Markdown
Member

This is what does the updating to the runtime version that gets used by tests:

<!-- Update KnownFrameworkReferences to target the right version of the runtime -->
<ItemGroupCondition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))
and '$(MSBuildProjectName)' != 'toolset-tasks'">
<FrameworkReference
Update="Microsoft.NETCore.App"
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
</ItemGroup>

But with this PR, $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)')) is false:

  • MicrosoftNETCoreAppRefPackageVersion is 9.0.0-alpha.1.23430.1
  • _TargetFrameworkVersionWithoutV is 8.0

@elinor-fung

Copy link
Copy Markdown
Member

@dsplaisted / @marcpopMSFT how does SDK usually handle updating major versions and targeting the consumed runtime version?

The retargeting for ASP.NET references has a similar condition:

<ItemGroupCondition="$(MicrosoftAspNetCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))">
<KnownFrameworkReferenceUpdate="Microsoft.AspNetCore.App">
<LatestRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
<RuntimePackRuntimeIdentifiers>${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers>
<TargetingPackVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</TargetingPackVersion>
<DefaultRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</DefaultRuntimeFrameworkVersion>
</KnownFrameworkReference>
</ItemGroup>

@v-wuzhai
v-wuzhai requested a review from a team as a code ownerAugust 31, 2023 10:24
@dsplaisted

Copy link
Copy Markdown
Member

Now that the dependency flow is bringing in .NET 9 instead of .NET 8, the build doesn't have a version of .NET 8 to update the targeting to. I think the thing to do here is to update the stage 0 SDK to one that has a recent enough version of the runtime.

FYI for those not aware, here is where we are trying to keep track of the changes needed each time we update to a new TargetFramework: https://github.com/dotnet/sdk/blob/main/documentation/general/UpdateToNewTargetFramework.md Feel free to update it as appropriate.

@lewing

lewing commented Sep 2, 2023

Copy link
Copy Markdown
MemberAuthor

@ViktorHofer @dotnet/domestic-cat please take a look

Comment on lines +61 to 78
var originalBundledNETCoreAppPackageVersion = propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value;
var parsedOriginalBundledPackageVersion = SemanticVersion.Parse(originalBundledNETCoreAppPackageVersion);
var parsedMicrosoftNETCoreAppRefPackageVersion =
SemanticVersion.Parse(microsoftNETCoreAppRefPackageVersion);

// In the case where we have a new major version, it'll come in first through the dotnet/runtime flow of the
// SDK's own package references. The Stage0 SDK's bundled version props file will still be on the older major version
// (and the older TFM that goes along with that). If we just replaced the bundled version with the new major version,
// apps that target the 'older' TFM would fail to build. So we need to keep the bundled version from the existing
// bundledversions.props in this one specific case.

var newBundledPackageVersion =
parsedOriginalBundledPackageVersion.Major == parsedMicrosoftNETCoreAppRefPackageVersion.Major
? microsoftNETCoreAppRefPackageVersion
: originalBundledNETCoreAppPackageVersion;

propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value = newBundledPackageVersion;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@dsplaisted would you mind double-checking this and seeing if it matched what you were talking about?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, this matches what I expected. It might be better to use NuGetVersion instead of SemanticVersion. I'm not too sure of the differences between them, but the code I've seen has used NuGetVersion.

@marcpopMSFT

Copy link
Copy Markdown
Member

latest change has us down to 34 test failures. @dotnet/source-build-internal @agocke@sbomer

  1. Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.WasmAoTPublishIntegrationTest.AoT_Publish_WithExistingWebConfig_Works
    emcc : error : C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory ("C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a" was expected to be an input file, based on the commandline arguments provided) [C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\AoT_Publish_W---DA56BF44\blazorwasm\blazorwasm.csproj]
  2. Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled
    Expected command to fail but it did not.
  3. Source build is flagging the 8.0 downgrades I checked in to fix the System.Text.Json failure. Not sure what to do about this as it's meant to be temporary
Package IDs are:
Microsoft.Bcl.AsyncInterfaces.8.0.0-rc.1.23414.4
Microsoft.Extensions.DependencyModel.8.0.0-rc.1.23414.4
Microsoft.NET.HostModel.8.0.0-rc.1.23414.4```
There are a few other individual tests failures are unbuntu it looks like that also need to be looked into.

@elinor-fung

Copy link
Copy Markdown
Member

Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled

Microsoft.DotNet.ILCompiler being used is now 8.0.0-rc.1.23414.4 - which is from before dotnet/runtime#90811 (main is using 8.0.0-rc.1.23421.3). Maybe related to the BundledVersions changes in this PR?

Side note: not the issue being hit in this PR, but that error is also being downgraded to a warning (dotnet/runtime#91715), so the test will also need to be updated when that change flows over.

@lewing

Copy link
Copy Markdown
MemberAuthor

I've updated the runtime flow to the most recent build. The wasm build is odd @maraf and @radical can you please take a look.

@elinor-fung

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

Maybe the wasm error is the same as root cause as the native aot one - seems like the test environment gets constructed such that it is using older packages. As with Microsoft.DotNet.ILCompiler, the version of Microsoft.NETCore.App.Runtime.Mono.browser-wasm being used is an older version - 8.0.0-rc.1.23414.4 - which is before libmono-wasm-simd.a was added.

@radical

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

This is because 9.0 targets are being used with a 8.0 runtime pack. I'm trying to reproduce this locally now.

The tests fail with:
```
emcc : error : /private/tmp/helix/working/A19408C3/w/B54A09BA/e/testExecutionDirectory/.nuget/packages/microsoft.netcore.app.runtime.mono.browser-wasm/8.0.0-rc.1.23414.4/runtimes/browser-wasm/native/libmono-wasm-simd.a: No such file or directory
```
.. because the build is using 9.0 targets, but 8.0 runtime pack.
This commit works around that issue by overriding the runtime pack path
to point to the correct one. `WasmOverridePacks.targets` is taken from
`Wasm.Build.Tests` in `dotnet/runtime`.
This workaround can be removed once we have a proper 9.0 workload.
@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like we are down to NativeAOT publish failures now?

@marek-safar

Copy link
Copy Markdown
Contributor

@sbomer@LakshanF could you help with resolving tests failures in AotStaticLibraryPublishWithEventPipe ?

@marek-safar

Copy link
Copy Markdown
Contributor

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

Comment threadeng/Version.Details.xml Outdated
</Dependency>
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="8.0.0-rc.1.23421.3">
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1">
<Uri>https://github.com/dotnet/runtime</Uri>

@MichaelSimonsMichaelSimonsSep 19, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this intentionally incoherent with the other runtime dependencies? They are on version 9.0.0-alpha.1.23464.19 and sha a6c64c3c26417f579022e20cbcee992b4814ed2c. This is the source of the following source-build prebuilts that are being reported:

 <Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" IsDirectDependency="true" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" IsDirectDependency="true" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We actually removed Microsoft.NETCore.DotNetHostResolver in runtime. It looks like this repo is using it to grab hostfxr for Framework builds. I think it can use Microsoft.NETCore.App.Runtime.* packages - I'll take a look.

@MichaelSimons

Copy link
Copy Markdown
Member

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

I took a quick look. Here is what I did:

  1. Reviewed the prebuilt baseline-comparison.xml.
  2. Noted two classes of prebuilts as they come from two different project groupings.
  3. First grouping is from src/artifacts/obj/Release/Sdks/Microsoft.NET.Sdk/tools/project.assets.json which when looking at the changes led me to this conclusion.
  4. Second grouping is from src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json and src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json which led me to review the version of the referenced prebuilts in the versions.props and version.details.xml and noticed this incoherency.

@elinor-fung

Copy link
Copy Markdown
Member

Second grouping from Microsoft.DotNet.MSBuildSdkResolver / Microsoft.DotNet.SdkResolver is resolved.

#35048 (comment) is all that is left.

@lewing

Copy link
Copy Markdown
MemberAuthor

@marcpopMSFT ping

@marcpopMSFT
marcpopMSFT merged commit 1bdc5a5 into mainSep 20, 2023
@marcpopMSFT
marcpopMSFT deleted the update-emsdk-manifest branch September 20, 2023 06:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-CodeFlowuntriagedRequest triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

18 participants

@lewing@jeffschwMSFT@mmitche@elinor-fung@dsplaisted@ViktorHofer@agocke@nagilson@marcpopMSFT@baronfel@vitek-karas@radical@marek-safar@MichaelSimons@joeloff@hoyosjs@LakshanF@mthalman
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' [main] Update dotnet/runtime by lewing · Pull Request #35048 · dotnet/sdk · GitHub
Skip to content

[main] Update dotnet/runtime - #35048

Merged
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest
Sep 20, 2023
Merged

[main] Update dotnet/runtime#35048
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest

Conversation

@lewing

@lewinglewing commented Aug 30, 2023

Copy link
Copy Markdown
Member

Fix the 9.0.100 band in the emsdk transport package name

@lewing

Copy link
Copy Markdown
MemberAuthor

this may need additional tweaks to deal with the band versioning

@lewing
lewing requested a review from agockeAugust 30, 2023 17:54
Comment threadeng/Versions.props Outdated
@lewing

Copy link
Copy Markdown
MemberAuthor

Installer needs a bunch of updates as well once this lands

@ghostghost added the untriaged Request triage from a team member label Aug 30, 2023
@jeffschwMSFT

Copy link
Copy Markdown
Member

who is on point to either identifying the individual failures and farming out the work and/or handling them?

@mmitche

Copy link
Copy Markdown
Member

@jeffschwMSFT There shouldn't be too much. This was the commit to switch to 8: 8119940

@lewing

Copy link
Copy Markdown
MemberAuthor

opened dotnet/arcade#14002 for future me

@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like it is failing on rid resolution now @elinor-fung can you take a look?

@elinor-fung

Copy link
Copy Markdown
Member

The built tests are configured to run on a runtime from before dotnet/docs#36466 for some reason.

If I build main, the runtimeconfig for the Microsoft.NET.Build.Tests has the runtime version corresponding to Version.props/Version.Details.xml:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-rc.1.23421.3"
},

But from this branch, it has:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-preview.7.23375.6"
},

I'm not sure why yet - cc @dsplaisted in case it is something obvious to you

@elinor-fung

Copy link
Copy Markdown
Member

This is what does the updating to the runtime version that gets used by tests:

<!-- Update KnownFrameworkReferences to target the right version of the runtime -->
<ItemGroupCondition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))
and '$(MSBuildProjectName)' != 'toolset-tasks'">
<FrameworkReference
Update="Microsoft.NETCore.App"
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
</ItemGroup>

But with this PR, $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)')) is false:

  • MicrosoftNETCoreAppRefPackageVersion is 9.0.0-alpha.1.23430.1
  • _TargetFrameworkVersionWithoutV is 8.0

@elinor-fung

Copy link
Copy Markdown
Member

@dsplaisted / @marcpopMSFT how does SDK usually handle updating major versions and targeting the consumed runtime version?

The retargeting for ASP.NET references has a similar condition:

<ItemGroupCondition="$(MicrosoftAspNetCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))">
<KnownFrameworkReferenceUpdate="Microsoft.AspNetCore.App">
<LatestRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
<RuntimePackRuntimeIdentifiers>${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers>
<TargetingPackVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</TargetingPackVersion>
<DefaultRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</DefaultRuntimeFrameworkVersion>
</KnownFrameworkReference>
</ItemGroup>

@v-wuzhai
v-wuzhai requested a review from a team as a code ownerAugust 31, 2023 10:24
@dsplaisted

Copy link
Copy Markdown
Member

Now that the dependency flow is bringing in .NET 9 instead of .NET 8, the build doesn't have a version of .NET 8 to update the targeting to. I think the thing to do here is to update the stage 0 SDK to one that has a recent enough version of the runtime.

FYI for those not aware, here is where we are trying to keep track of the changes needed each time we update to a new TargetFramework: https://github.com/dotnet/sdk/blob/main/documentation/general/UpdateToNewTargetFramework.md Feel free to update it as appropriate.

@lewing

lewing commented Sep 2, 2023

Copy link
Copy Markdown
MemberAuthor

@ViktorHofer @dotnet/domestic-cat please take a look

Comment on lines +61 to 78
var originalBundledNETCoreAppPackageVersion = propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value;
var parsedOriginalBundledPackageVersion = SemanticVersion.Parse(originalBundledNETCoreAppPackageVersion);
var parsedMicrosoftNETCoreAppRefPackageVersion =
SemanticVersion.Parse(microsoftNETCoreAppRefPackageVersion);

// In the case where we have a new major version, it'll come in first through the dotnet/runtime flow of the
// SDK's own package references. The Stage0 SDK's bundled version props file will still be on the older major version
// (and the older TFM that goes along with that). If we just replaced the bundled version with the new major version,
// apps that target the 'older' TFM would fail to build. So we need to keep the bundled version from the existing
// bundledversions.props in this one specific case.

var newBundledPackageVersion =
parsedOriginalBundledPackageVersion.Major == parsedMicrosoftNETCoreAppRefPackageVersion.Major
? microsoftNETCoreAppRefPackageVersion
: originalBundledNETCoreAppPackageVersion;

propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value = newBundledPackageVersion;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@dsplaisted would you mind double-checking this and seeing if it matched what you were talking about?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, this matches what I expected. It might be better to use NuGetVersion instead of SemanticVersion. I'm not too sure of the differences between them, but the code I've seen has used NuGetVersion.

@marcpopMSFT

Copy link
Copy Markdown
Member

latest change has us down to 34 test failures. @dotnet/source-build-internal @agocke@sbomer

  1. Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.WasmAoTPublishIntegrationTest.AoT_Publish_WithExistingWebConfig_Works
    emcc : error : C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory ("C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a" was expected to be an input file, based on the commandline arguments provided) [C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\AoT_Publish_W---DA56BF44\blazorwasm\blazorwasm.csproj]
  2. Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled
    Expected command to fail but it did not.
  3. Source build is flagging the 8.0 downgrades I checked in to fix the System.Text.Json failure. Not sure what to do about this as it's meant to be temporary
Package IDs are:
Microsoft.Bcl.AsyncInterfaces.8.0.0-rc.1.23414.4
Microsoft.Extensions.DependencyModel.8.0.0-rc.1.23414.4
Microsoft.NET.HostModel.8.0.0-rc.1.23414.4```
There are a few other individual tests failures are unbuntu it looks like that also need to be looked into.

@elinor-fung

Copy link
Copy Markdown
Member

Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled

Microsoft.DotNet.ILCompiler being used is now 8.0.0-rc.1.23414.4 - which is from before dotnet/runtime#90811 (main is using 8.0.0-rc.1.23421.3). Maybe related to the BundledVersions changes in this PR?

Side note: not the issue being hit in this PR, but that error is also being downgraded to a warning (dotnet/runtime#91715), so the test will also need to be updated when that change flows over.

@lewing

Copy link
Copy Markdown
MemberAuthor

I've updated the runtime flow to the most recent build. The wasm build is odd @maraf and @radical can you please take a look.

@elinor-fung

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

Maybe the wasm error is the same as root cause as the native aot one - seems like the test environment gets constructed such that it is using older packages. As with Microsoft.DotNet.ILCompiler, the version of Microsoft.NETCore.App.Runtime.Mono.browser-wasm being used is an older version - 8.0.0-rc.1.23414.4 - which is before libmono-wasm-simd.a was added.

@radical

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

This is because 9.0 targets are being used with a 8.0 runtime pack. I'm trying to reproduce this locally now.

The tests fail with:
```
emcc : error : /private/tmp/helix/working/A19408C3/w/B54A09BA/e/testExecutionDirectory/.nuget/packages/microsoft.netcore.app.runtime.mono.browser-wasm/8.0.0-rc.1.23414.4/runtimes/browser-wasm/native/libmono-wasm-simd.a: No such file or directory
```
.. because the build is using 9.0 targets, but 8.0 runtime pack.
This commit works around that issue by overriding the runtime pack path
to point to the correct one. `WasmOverridePacks.targets` is taken from
`Wasm.Build.Tests` in `dotnet/runtime`.
This workaround can be removed once we have a proper 9.0 workload.
@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like we are down to NativeAOT publish failures now?

@marek-safar

Copy link
Copy Markdown
Contributor

@sbomer@LakshanF could you help with resolving tests failures in AotStaticLibraryPublishWithEventPipe ?

@marek-safar

Copy link
Copy Markdown
Contributor

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

Comment threadeng/Version.Details.xml Outdated
</Dependency>
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="8.0.0-rc.1.23421.3">
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1">
<Uri>https://github.com/dotnet/runtime</Uri>

@MichaelSimonsMichaelSimonsSep 19, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this intentionally incoherent with the other runtime dependencies? They are on version 9.0.0-alpha.1.23464.19 and sha a6c64c3c26417f579022e20cbcee992b4814ed2c. This is the source of the following source-build prebuilts that are being reported:

 <Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" IsDirectDependency="true" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" IsDirectDependency="true" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We actually removed Microsoft.NETCore.DotNetHostResolver in runtime. It looks like this repo is using it to grab hostfxr for Framework builds. I think it can use Microsoft.NETCore.App.Runtime.* packages - I'll take a look.

@MichaelSimons

Copy link
Copy Markdown
Member

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

I took a quick look. Here is what I did:

  1. Reviewed the prebuilt baseline-comparison.xml.
  2. Noted two classes of prebuilts as they come from two different project groupings.
  3. First grouping is from src/artifacts/obj/Release/Sdks/Microsoft.NET.Sdk/tools/project.assets.json which when looking at the changes led me to this conclusion.
  4. Second grouping is from src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json and src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json which led me to review the version of the referenced prebuilts in the versions.props and version.details.xml and noticed this incoherency.

@elinor-fung

Copy link
Copy Markdown
Member

Second grouping from Microsoft.DotNet.MSBuildSdkResolver / Microsoft.DotNet.SdkResolver is resolved.

#35048 (comment) is all that is left.

@lewing

Copy link
Copy Markdown
MemberAuthor

@marcpopMSFT ping

@marcpopMSFT
marcpopMSFT merged commit 1bdc5a5 into mainSep 20, 2023
@marcpopMSFT
marcpopMSFT deleted the update-emsdk-manifest branch September 20, 2023 06:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-CodeFlowuntriagedRequest triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

18 participants

@lewing@jeffschwMSFT@mmitche@elinor-fung@dsplaisted@ViktorHofer@agocke@nagilson@marcpopMSFT@baronfel@vitek-karas@radical@marek-safar@MichaelSimons@joeloff@hoyosjs@LakshanF@mthalman
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' [main] Update dotnet/runtime by lewing · Pull Request #35048 · dotnet/sdk · GitHub
Skip to content

[main] Update dotnet/runtime - #35048

Merged
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest
Sep 20, 2023
Merged

[main] Update dotnet/runtime#35048
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest

Conversation

@lewing

@lewinglewing commented Aug 30, 2023

Copy link
Copy Markdown
Member

Fix the 9.0.100 band in the emsdk transport package name

@lewing

Copy link
Copy Markdown
MemberAuthor

this may need additional tweaks to deal with the band versioning

@lewing
lewing requested a review from agockeAugust 30, 2023 17:54
Comment threadeng/Versions.props Outdated
@lewing

Copy link
Copy Markdown
MemberAuthor

Installer needs a bunch of updates as well once this lands

@ghostghost added the untriaged Request triage from a team member label Aug 30, 2023
@jeffschwMSFT

Copy link
Copy Markdown
Member

who is on point to either identifying the individual failures and farming out the work and/or handling them?

@mmitche

Copy link
Copy Markdown
Member

@jeffschwMSFT There shouldn't be too much. This was the commit to switch to 8: 8119940

@lewing

Copy link
Copy Markdown
MemberAuthor

opened dotnet/arcade#14002 for future me

@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like it is failing on rid resolution now @elinor-fung can you take a look?

@elinor-fung

Copy link
Copy Markdown
Member

The built tests are configured to run on a runtime from before dotnet/docs#36466 for some reason.

If I build main, the runtimeconfig for the Microsoft.NET.Build.Tests has the runtime version corresponding to Version.props/Version.Details.xml:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-rc.1.23421.3"
},

But from this branch, it has:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-preview.7.23375.6"
},

I'm not sure why yet - cc @dsplaisted in case it is something obvious to you

@elinor-fung

Copy link
Copy Markdown
Member

This is what does the updating to the runtime version that gets used by tests:

<!-- Update KnownFrameworkReferences to target the right version of the runtime -->
<ItemGroupCondition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))
and '$(MSBuildProjectName)' != 'toolset-tasks'">
<FrameworkReference
Update="Microsoft.NETCore.App"
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
</ItemGroup>

But with this PR, $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)')) is false:

  • MicrosoftNETCoreAppRefPackageVersion is 9.0.0-alpha.1.23430.1
  • _TargetFrameworkVersionWithoutV is 8.0

@elinor-fung

Copy link
Copy Markdown
Member

@dsplaisted / @marcpopMSFT how does SDK usually handle updating major versions and targeting the consumed runtime version?

The retargeting for ASP.NET references has a similar condition:

<ItemGroupCondition="$(MicrosoftAspNetCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))">
<KnownFrameworkReferenceUpdate="Microsoft.AspNetCore.App">
<LatestRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
<RuntimePackRuntimeIdentifiers>${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers>
<TargetingPackVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</TargetingPackVersion>
<DefaultRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</DefaultRuntimeFrameworkVersion>
</KnownFrameworkReference>
</ItemGroup>

@v-wuzhai
v-wuzhai requested a review from a team as a code ownerAugust 31, 2023 10:24
@dsplaisted

Copy link
Copy Markdown
Member

Now that the dependency flow is bringing in .NET 9 instead of .NET 8, the build doesn't have a version of .NET 8 to update the targeting to. I think the thing to do here is to update the stage 0 SDK to one that has a recent enough version of the runtime.

FYI for those not aware, here is where we are trying to keep track of the changes needed each time we update to a new TargetFramework: https://github.com/dotnet/sdk/blob/main/documentation/general/UpdateToNewTargetFramework.md Feel free to update it as appropriate.

@lewing

lewing commented Sep 2, 2023

Copy link
Copy Markdown
MemberAuthor

@ViktorHofer @dotnet/domestic-cat please take a look

Comment on lines +61 to 78
var originalBundledNETCoreAppPackageVersion = propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value;
var parsedOriginalBundledPackageVersion = SemanticVersion.Parse(originalBundledNETCoreAppPackageVersion);
var parsedMicrosoftNETCoreAppRefPackageVersion =
SemanticVersion.Parse(microsoftNETCoreAppRefPackageVersion);

// In the case where we have a new major version, it'll come in first through the dotnet/runtime flow of the
// SDK's own package references. The Stage0 SDK's bundled version props file will still be on the older major version
// (and the older TFM that goes along with that). If we just replaced the bundled version with the new major version,
// apps that target the 'older' TFM would fail to build. So we need to keep the bundled version from the existing
// bundledversions.props in this one specific case.

var newBundledPackageVersion =
parsedOriginalBundledPackageVersion.Major == parsedMicrosoftNETCoreAppRefPackageVersion.Major
? microsoftNETCoreAppRefPackageVersion
: originalBundledNETCoreAppPackageVersion;

propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value = newBundledPackageVersion;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@dsplaisted would you mind double-checking this and seeing if it matched what you were talking about?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, this matches what I expected. It might be better to use NuGetVersion instead of SemanticVersion. I'm not too sure of the differences between them, but the code I've seen has used NuGetVersion.

@marcpopMSFT

Copy link
Copy Markdown
Member

latest change has us down to 34 test failures. @dotnet/source-build-internal @agocke@sbomer

  1. Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.WasmAoTPublishIntegrationTest.AoT_Publish_WithExistingWebConfig_Works
    emcc : error : C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory ("C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a" was expected to be an input file, based on the commandline arguments provided) [C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\AoT_Publish_W---DA56BF44\blazorwasm\blazorwasm.csproj]
  2. Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled
    Expected command to fail but it did not.
  3. Source build is flagging the 8.0 downgrades I checked in to fix the System.Text.Json failure. Not sure what to do about this as it's meant to be temporary
Package IDs are:
Microsoft.Bcl.AsyncInterfaces.8.0.0-rc.1.23414.4
Microsoft.Extensions.DependencyModel.8.0.0-rc.1.23414.4
Microsoft.NET.HostModel.8.0.0-rc.1.23414.4```
There are a few other individual tests failures are unbuntu it looks like that also need to be looked into.

@elinor-fung

Copy link
Copy Markdown
Member

Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled

Microsoft.DotNet.ILCompiler being used is now 8.0.0-rc.1.23414.4 - which is from before dotnet/runtime#90811 (main is using 8.0.0-rc.1.23421.3). Maybe related to the BundledVersions changes in this PR?

Side note: not the issue being hit in this PR, but that error is also being downgraded to a warning (dotnet/runtime#91715), so the test will also need to be updated when that change flows over.

@lewing

Copy link
Copy Markdown
MemberAuthor

I've updated the runtime flow to the most recent build. The wasm build is odd @maraf and @radical can you please take a look.

@elinor-fung

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

Maybe the wasm error is the same as root cause as the native aot one - seems like the test environment gets constructed such that it is using older packages. As with Microsoft.DotNet.ILCompiler, the version of Microsoft.NETCore.App.Runtime.Mono.browser-wasm being used is an older version - 8.0.0-rc.1.23414.4 - which is before libmono-wasm-simd.a was added.

@radical

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

This is because 9.0 targets are being used with a 8.0 runtime pack. I'm trying to reproduce this locally now.

The tests fail with:
```
emcc : error : /private/tmp/helix/working/A19408C3/w/B54A09BA/e/testExecutionDirectory/.nuget/packages/microsoft.netcore.app.runtime.mono.browser-wasm/8.0.0-rc.1.23414.4/runtimes/browser-wasm/native/libmono-wasm-simd.a: No such file or directory
```
.. because the build is using 9.0 targets, but 8.0 runtime pack.
This commit works around that issue by overriding the runtime pack path
to point to the correct one. `WasmOverridePacks.targets` is taken from
`Wasm.Build.Tests` in `dotnet/runtime`.
This workaround can be removed once we have a proper 9.0 workload.
@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like we are down to NativeAOT publish failures now?

@marek-safar

Copy link
Copy Markdown
Contributor

@sbomer@LakshanF could you help with resolving tests failures in AotStaticLibraryPublishWithEventPipe ?

@marek-safar

Copy link
Copy Markdown
Contributor

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

Comment threadeng/Version.Details.xml Outdated
</Dependency>
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="8.0.0-rc.1.23421.3">
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1">
<Uri>https://github.com/dotnet/runtime</Uri>

@MichaelSimonsMichaelSimonsSep 19, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this intentionally incoherent with the other runtime dependencies? They are on version 9.0.0-alpha.1.23464.19 and sha a6c64c3c26417f579022e20cbcee992b4814ed2c. This is the source of the following source-build prebuilts that are being reported:

 <Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" IsDirectDependency="true" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" IsDirectDependency="true" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We actually removed Microsoft.NETCore.DotNetHostResolver in runtime. It looks like this repo is using it to grab hostfxr for Framework builds. I think it can use Microsoft.NETCore.App.Runtime.* packages - I'll take a look.

@MichaelSimons

Copy link
Copy Markdown
Member

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

I took a quick look. Here is what I did:

  1. Reviewed the prebuilt baseline-comparison.xml.
  2. Noted two classes of prebuilts as they come from two different project groupings.
  3. First grouping is from src/artifacts/obj/Release/Sdks/Microsoft.NET.Sdk/tools/project.assets.json which when looking at the changes led me to this conclusion.
  4. Second grouping is from src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json and src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json which led me to review the version of the referenced prebuilts in the versions.props and version.details.xml and noticed this incoherency.

@elinor-fung

Copy link
Copy Markdown
Member

Second grouping from Microsoft.DotNet.MSBuildSdkResolver / Microsoft.DotNet.SdkResolver is resolved.

#35048 (comment) is all that is left.

@lewing

Copy link
Copy Markdown
MemberAuthor

@marcpopMSFT ping

@marcpopMSFT
marcpopMSFT merged commit 1bdc5a5 into mainSep 20, 2023
@marcpopMSFT
marcpopMSFT deleted the update-emsdk-manifest branch September 20, 2023 06:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-CodeFlowuntriagedRequest triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

18 participants

@lewing@jeffschwMSFT@mmitche@elinor-fung@dsplaisted@ViktorHofer@agocke@nagilson@marcpopMSFT@baronfel@vitek-karas@radical@marek-safar@MichaelSimons@joeloff@hoyosjs@LakshanF@mthalman
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' [main] Update dotnet/runtime by lewing · Pull Request #35048 · dotnet/sdk · GitHub
Skip to content

[main] Update dotnet/runtime - #35048

Merged
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest
Sep 20, 2023
Merged

[main] Update dotnet/runtime#35048
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest

Conversation

@lewing

@lewinglewing commented Aug 30, 2023

Copy link
Copy Markdown
Member

Fix the 9.0.100 band in the emsdk transport package name

@lewing

Copy link
Copy Markdown
MemberAuthor

this may need additional tweaks to deal with the band versioning

@lewing
lewing requested a review from agockeAugust 30, 2023 17:54
Comment threadeng/Versions.props Outdated
@lewing

Copy link
Copy Markdown
MemberAuthor

Installer needs a bunch of updates as well once this lands

@ghostghost added the untriaged Request triage from a team member label Aug 30, 2023
@jeffschwMSFT

Copy link
Copy Markdown
Member

who is on point to either identifying the individual failures and farming out the work and/or handling them?

@mmitche

Copy link
Copy Markdown
Member

@jeffschwMSFT There shouldn't be too much. This was the commit to switch to 8: 8119940

@lewing

Copy link
Copy Markdown
MemberAuthor

opened dotnet/arcade#14002 for future me

@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like it is failing on rid resolution now @elinor-fung can you take a look?

@elinor-fung

Copy link
Copy Markdown
Member

The built tests are configured to run on a runtime from before dotnet/docs#36466 for some reason.

If I build main, the runtimeconfig for the Microsoft.NET.Build.Tests has the runtime version corresponding to Version.props/Version.Details.xml:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-rc.1.23421.3"
},

But from this branch, it has:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-preview.7.23375.6"
},

I'm not sure why yet - cc @dsplaisted in case it is something obvious to you

@elinor-fung

Copy link
Copy Markdown
Member

This is what does the updating to the runtime version that gets used by tests:

<!-- Update KnownFrameworkReferences to target the right version of the runtime -->
<ItemGroupCondition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))
and '$(MSBuildProjectName)' != 'toolset-tasks'">
<FrameworkReference
Update="Microsoft.NETCore.App"
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
</ItemGroup>

But with this PR, $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)')) is false:

  • MicrosoftNETCoreAppRefPackageVersion is 9.0.0-alpha.1.23430.1
  • _TargetFrameworkVersionWithoutV is 8.0

@elinor-fung

Copy link
Copy Markdown
Member

@dsplaisted / @marcpopMSFT how does SDK usually handle updating major versions and targeting the consumed runtime version?

The retargeting for ASP.NET references has a similar condition:

<ItemGroupCondition="$(MicrosoftAspNetCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))">
<KnownFrameworkReferenceUpdate="Microsoft.AspNetCore.App">
<LatestRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
<RuntimePackRuntimeIdentifiers>${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers>
<TargetingPackVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</TargetingPackVersion>
<DefaultRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</DefaultRuntimeFrameworkVersion>
</KnownFrameworkReference>
</ItemGroup>

@v-wuzhai
v-wuzhai requested a review from a team as a code ownerAugust 31, 2023 10:24
@dsplaisted

Copy link
Copy Markdown
Member

Now that the dependency flow is bringing in .NET 9 instead of .NET 8, the build doesn't have a version of .NET 8 to update the targeting to. I think the thing to do here is to update the stage 0 SDK to one that has a recent enough version of the runtime.

FYI for those not aware, here is where we are trying to keep track of the changes needed each time we update to a new TargetFramework: https://github.com/dotnet/sdk/blob/main/documentation/general/UpdateToNewTargetFramework.md Feel free to update it as appropriate.

@lewing

lewing commented Sep 2, 2023

Copy link
Copy Markdown
MemberAuthor

@ViktorHofer @dotnet/domestic-cat please take a look

Comment on lines +61 to 78
var originalBundledNETCoreAppPackageVersion = propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value;
var parsedOriginalBundledPackageVersion = SemanticVersion.Parse(originalBundledNETCoreAppPackageVersion);
var parsedMicrosoftNETCoreAppRefPackageVersion =
SemanticVersion.Parse(microsoftNETCoreAppRefPackageVersion);

// In the case where we have a new major version, it'll come in first through the dotnet/runtime flow of the
// SDK's own package references. The Stage0 SDK's bundled version props file will still be on the older major version
// (and the older TFM that goes along with that). If we just replaced the bundled version with the new major version,
// apps that target the 'older' TFM would fail to build. So we need to keep the bundled version from the existing
// bundledversions.props in this one specific case.

var newBundledPackageVersion =
parsedOriginalBundledPackageVersion.Major == parsedMicrosoftNETCoreAppRefPackageVersion.Major
? microsoftNETCoreAppRefPackageVersion
: originalBundledNETCoreAppPackageVersion;

propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value = newBundledPackageVersion;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@dsplaisted would you mind double-checking this and seeing if it matched what you were talking about?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, this matches what I expected. It might be better to use NuGetVersion instead of SemanticVersion. I'm not too sure of the differences between them, but the code I've seen has used NuGetVersion.

@marcpopMSFT

Copy link
Copy Markdown
Member

latest change has us down to 34 test failures. @dotnet/source-build-internal @agocke@sbomer

  1. Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.WasmAoTPublishIntegrationTest.AoT_Publish_WithExistingWebConfig_Works
    emcc : error : C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory ("C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a" was expected to be an input file, based on the commandline arguments provided) [C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\AoT_Publish_W---DA56BF44\blazorwasm\blazorwasm.csproj]
  2. Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled
    Expected command to fail but it did not.
  3. Source build is flagging the 8.0 downgrades I checked in to fix the System.Text.Json failure. Not sure what to do about this as it's meant to be temporary
Package IDs are:
Microsoft.Bcl.AsyncInterfaces.8.0.0-rc.1.23414.4
Microsoft.Extensions.DependencyModel.8.0.0-rc.1.23414.4
Microsoft.NET.HostModel.8.0.0-rc.1.23414.4```
There are a few other individual tests failures are unbuntu it looks like that also need to be looked into.

@elinor-fung

Copy link
Copy Markdown
Member

Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled

Microsoft.DotNet.ILCompiler being used is now 8.0.0-rc.1.23414.4 - which is from before dotnet/runtime#90811 (main is using 8.0.0-rc.1.23421.3). Maybe related to the BundledVersions changes in this PR?

Side note: not the issue being hit in this PR, but that error is also being downgraded to a warning (dotnet/runtime#91715), so the test will also need to be updated when that change flows over.

@lewing

Copy link
Copy Markdown
MemberAuthor

I've updated the runtime flow to the most recent build. The wasm build is odd @maraf and @radical can you please take a look.

@elinor-fung

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

Maybe the wasm error is the same as root cause as the native aot one - seems like the test environment gets constructed such that it is using older packages. As with Microsoft.DotNet.ILCompiler, the version of Microsoft.NETCore.App.Runtime.Mono.browser-wasm being used is an older version - 8.0.0-rc.1.23414.4 - which is before libmono-wasm-simd.a was added.

@radical

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

This is because 9.0 targets are being used with a 8.0 runtime pack. I'm trying to reproduce this locally now.

The tests fail with:
```
emcc : error : /private/tmp/helix/working/A19408C3/w/B54A09BA/e/testExecutionDirectory/.nuget/packages/microsoft.netcore.app.runtime.mono.browser-wasm/8.0.0-rc.1.23414.4/runtimes/browser-wasm/native/libmono-wasm-simd.a: No such file or directory
```
.. because the build is using 9.0 targets, but 8.0 runtime pack.
This commit works around that issue by overriding the runtime pack path
to point to the correct one. `WasmOverridePacks.targets` is taken from
`Wasm.Build.Tests` in `dotnet/runtime`.
This workaround can be removed once we have a proper 9.0 workload.
@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like we are down to NativeAOT publish failures now?

@marek-safar

Copy link
Copy Markdown
Contributor

@sbomer@LakshanF could you help with resolving tests failures in AotStaticLibraryPublishWithEventPipe ?

@marek-safar

Copy link
Copy Markdown
Contributor

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

Comment threadeng/Version.Details.xml Outdated
</Dependency>
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="8.0.0-rc.1.23421.3">
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1">
<Uri>https://github.com/dotnet/runtime</Uri>

@MichaelSimonsMichaelSimonsSep 19, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this intentionally incoherent with the other runtime dependencies? They are on version 9.0.0-alpha.1.23464.19 and sha a6c64c3c26417f579022e20cbcee992b4814ed2c. This is the source of the following source-build prebuilts that are being reported:

 <Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" IsDirectDependency="true" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" IsDirectDependency="true" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We actually removed Microsoft.NETCore.DotNetHostResolver in runtime. It looks like this repo is using it to grab hostfxr for Framework builds. I think it can use Microsoft.NETCore.App.Runtime.* packages - I'll take a look.

@MichaelSimons

Copy link
Copy Markdown
Member

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

I took a quick look. Here is what I did:

  1. Reviewed the prebuilt baseline-comparison.xml.
  2. Noted two classes of prebuilts as they come from two different project groupings.
  3. First grouping is from src/artifacts/obj/Release/Sdks/Microsoft.NET.Sdk/tools/project.assets.json which when looking at the changes led me to this conclusion.
  4. Second grouping is from src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json and src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json which led me to review the version of the referenced prebuilts in the versions.props and version.details.xml and noticed this incoherency.

@elinor-fung

Copy link
Copy Markdown
Member

Second grouping from Microsoft.DotNet.MSBuildSdkResolver / Microsoft.DotNet.SdkResolver is resolved.

#35048 (comment) is all that is left.

@lewing

Copy link
Copy Markdown
MemberAuthor

@marcpopMSFT ping

@marcpopMSFT
marcpopMSFT merged commit 1bdc5a5 into mainSep 20, 2023
@marcpopMSFT
marcpopMSFT deleted the update-emsdk-manifest branch September 20, 2023 06:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-CodeFlowuntriagedRequest triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

18 participants

@lewing@jeffschwMSFT@mmitche@elinor-fung@dsplaisted@ViktorHofer@agocke@nagilson@marcpopMSFT@baronfel@vitek-karas@radical@marek-safar@MichaelSimons@joeloff@hoyosjs@LakshanF@mthalman
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); [main] Update dotnet/runtime by lewing · Pull Request #35048 · dotnet/sdk · GitHub
Skip to content

[main] Update dotnet/runtime - #35048

Merged
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest
Sep 20, 2023
Merged

[main] Update dotnet/runtime#35048
marcpopMSFT merged 32 commits into
mainfrom
update-emsdk-manifest

Conversation

@lewing

@lewinglewing commented Aug 30, 2023

Copy link
Copy Markdown
Member

Fix the 9.0.100 band in the emsdk transport package name

@lewing

Copy link
Copy Markdown
MemberAuthor

this may need additional tweaks to deal with the band versioning

@lewing
lewing requested a review from agockeAugust 30, 2023 17:54
Comment threadeng/Versions.props Outdated
@lewing

Copy link
Copy Markdown
MemberAuthor

Installer needs a bunch of updates as well once this lands

@ghostghost added the untriaged Request triage from a team member label Aug 30, 2023
@jeffschwMSFT

Copy link
Copy Markdown
Member

who is on point to either identifying the individual failures and farming out the work and/or handling them?

@mmitche

Copy link
Copy Markdown
Member

@jeffschwMSFT There shouldn't be too much. This was the commit to switch to 8: 8119940

@lewing

Copy link
Copy Markdown
MemberAuthor

opened dotnet/arcade#14002 for future me

@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like it is failing on rid resolution now @elinor-fung can you take a look?

@elinor-fung

Copy link
Copy Markdown
Member

The built tests are configured to run on a runtime from before dotnet/docs#36466 for some reason.

If I build main, the runtimeconfig for the Microsoft.NET.Build.Tests has the runtime version corresponding to Version.props/Version.Details.xml:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-rc.1.23421.3"
},

But from this branch, it has:

 "runtimeOptions": {
"tfm": "net8.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0-preview.7.23375.6"
},

I'm not sure why yet - cc @dsplaisted in case it is something obvious to you

@elinor-fung

Copy link
Copy Markdown
Member

This is what does the updating to the runtime version that gets used by tests:

<!-- Update KnownFrameworkReferences to target the right version of the runtime -->
<ItemGroupCondition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'
and $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))
and '$(MSBuildProjectName)' != 'toolset-tasks'">
<FrameworkReference
Update="Microsoft.NETCore.App"
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)" />
</ItemGroup>

But with this PR, $(MicrosoftNETCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)')) is false:

  • MicrosoftNETCoreAppRefPackageVersion is 9.0.0-alpha.1.23430.1
  • _TargetFrameworkVersionWithoutV is 8.0

@elinor-fung

Copy link
Copy Markdown
Member

@dsplaisted / @marcpopMSFT how does SDK usually handle updating major versions and targeting the consumed runtime version?

The retargeting for ASP.NET references has a similar condition:

<ItemGroupCondition="$(MicrosoftAspNetCoreAppRefPackageVersion.StartsWith('$(_TargetFrameworkVersionWithoutV)'))">
<KnownFrameworkReferenceUpdate="Microsoft.AspNetCore.App">
<LatestRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</LatestRuntimeFrameworkVersion>
<RuntimePackRuntimeIdentifiers>${SupportedRuntimeIdentifiers}</RuntimePackRuntimeIdentifiers>
<TargetingPackVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</TargetingPackVersion>
<DefaultRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</DefaultRuntimeFrameworkVersion>
</KnownFrameworkReference>
</ItemGroup>

@v-wuzhai
v-wuzhai requested a review from a team as a code ownerAugust 31, 2023 10:24
@dsplaisted

Copy link
Copy Markdown
Member

Now that the dependency flow is bringing in .NET 9 instead of .NET 8, the build doesn't have a version of .NET 8 to update the targeting to. I think the thing to do here is to update the stage 0 SDK to one that has a recent enough version of the runtime.

FYI for those not aware, here is where we are trying to keep track of the changes needed each time we update to a new TargetFramework: https://github.com/dotnet/sdk/blob/main/documentation/general/UpdateToNewTargetFramework.md Feel free to update it as appropriate.

@lewing

lewing commented Sep 2, 2023

Copy link
Copy Markdown
MemberAuthor

@ViktorHofer @dotnet/domestic-cat please take a look

Comment on lines +61 to 78
var originalBundledNETCoreAppPackageVersion = propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value;
var parsedOriginalBundledPackageVersion = SemanticVersion.Parse(originalBundledNETCoreAppPackageVersion);
var parsedMicrosoftNETCoreAppRefPackageVersion =
SemanticVersion.Parse(microsoftNETCoreAppRefPackageVersion);

// In the case where we have a new major version, it'll come in first through the dotnet/runtime flow of the
// SDK's own package references. The Stage0 SDK's bundled version props file will still be on the older major version
// (and the older TFM that goes along with that). If we just replaced the bundled version with the new major version,
// apps that target the 'older' TFM would fail to build. So we need to keep the bundled version from the existing
// bundledversions.props in this one specific case.

var newBundledPackageVersion =
parsedOriginalBundledPackageVersion.Major == parsedMicrosoftNETCoreAppRefPackageVersion.Major
? microsoftNETCoreAppRefPackageVersion
: originalBundledNETCoreAppPackageVersion;

propertyGroup.Element(ns + "BundledNETCoreAppPackageVersion").Value = newBundledPackageVersion;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@dsplaisted would you mind double-checking this and seeing if it matched what you were talking about?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, this matches what I expected. It might be better to use NuGetVersion instead of SemanticVersion. I'm not too sure of the differences between them, but the code I've seen has used NuGetVersion.

@marcpopMSFT

Copy link
Copy Markdown
Member

latest change has us down to 34 test failures. @dotnet/source-build-internal @agocke@sbomer

  1. Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.WasmAoTPublishIntegrationTest.AoT_Publish_WithExistingWebConfig_Works
    emcc : error : C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory ("C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a" was expected to be an input file, based on the commandline arguments provided) [C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b\AoT_Publish_W---DA56BF44\blazorwasm\blazorwasm.csproj]
  2. Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled
    Expected command to fail but it did not.
  3. Source build is flagging the 8.0 downgrades I checked in to fix the System.Text.Json failure. Not sure what to do about this as it's meant to be temporary
Package IDs are:
Microsoft.Bcl.AsyncInterfaces.8.0.0-rc.1.23414.4
Microsoft.Extensions.DependencyModel.8.0.0-rc.1.23414.4
Microsoft.NET.HostModel.8.0.0-rc.1.23414.4```
There are a few other individual tests failures are unbuntu it looks like that also need to be looked into.

@elinor-fung

Copy link
Copy Markdown
Member

Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAnAotApp.NativeAotLib_errors_out_when_eventpipe_is_enabled

Microsoft.DotNet.ILCompiler being used is now 8.0.0-rc.1.23414.4 - which is from before dotnet/runtime#90811 (main is using 8.0.0-rc.1.23421.3). Maybe related to the BundledVersions changes in this PR?

Side note: not the issue being hit in this PR, but that error is also being downgraded to a warning (dotnet/runtime#91715), so the test will also need to be updated when that change flows over.

@lewing

Copy link
Copy Markdown
MemberAuthor

I've updated the runtime flow to the most recent build. The wasm build is odd @maraf and @radical can you please take a look.

@elinor-fung

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

Maybe the wasm error is the same as root cause as the native aot one - seems like the test environment gets constructed such that it is using older packages. As with Microsoft.DotNet.ILCompiler, the version of Microsoft.NETCore.App.Runtime.Mono.browser-wasm being used is an older version - 8.0.0-rc.1.23414.4 - which is before libmono-wasm-simd.a was added.

@radical

Copy link
Copy Markdown
Member

C:\h\w\B1C3097B\t\dotnetSdkTests\ij4x4eyn.d0b.nuget\packages\microsoft.netcore.app.runtime.mono.browser-wasm\8.0.0-rc.1.23414.4\runtimes\browser-wasm\native\libmono-wasm-simd.a: No such file or directory

This is because 9.0 targets are being used with a 8.0 runtime pack. I'm trying to reproduce this locally now.

The tests fail with:
```
emcc : error : /private/tmp/helix/working/A19408C3/w/B54A09BA/e/testExecutionDirectory/.nuget/packages/microsoft.netcore.app.runtime.mono.browser-wasm/8.0.0-rc.1.23414.4/runtimes/browser-wasm/native/libmono-wasm-simd.a: No such file or directory
```
.. because the build is using 9.0 targets, but 8.0 runtime pack.
This commit works around that issue by overriding the runtime pack path
to point to the correct one. `WasmOverridePacks.targets` is taken from
`Wasm.Build.Tests` in `dotnet/runtime`.
This workaround can be removed once we have a proper 9.0 workload.
@lewing

Copy link
Copy Markdown
MemberAuthor

Looks like we are down to NativeAOT publish failures now?

@marek-safar

Copy link
Copy Markdown
Contributor

@sbomer@LakshanF could you help with resolving tests failures in AotStaticLibraryPublishWithEventPipe ?

@marek-safar

Copy link
Copy Markdown
Contributor

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

Comment threadeng/Version.Details.xml Outdated
</Dependency>
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="8.0.0-rc.1.23421.3">
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1">
<Uri>https://github.com/dotnet/runtime</Uri>

@MichaelSimonsMichaelSimonsSep 19, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this intentionally incoherent with the other runtime dependencies? They are on version 9.0.0-alpha.1.23464.19 and sha a6c64c3c26417f579022e20cbcee992b4814ed2c. This is the source of the following source-build prebuilts that are being reported:

 <Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetAppHost" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json" IsDirectDependency="true" />
<Usage Id="Microsoft.NETCore.DotNetHostResolver" Version="9.0.0-alpha.1.23455.1" File="src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json" IsDirectDependency="true" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We actually removed Microsoft.NETCore.DotNetHostResolver in runtime. It looks like this repo is using it to grab hostfxr for Framework builds. I think it can use Microsoft.NETCore.App.Runtime.* packages - I'll take a look.

@MichaelSimons

Copy link
Copy Markdown
Member

@dotnet/source-build-internal could you please advise how to track where these prebuilts are coming from and how to version baseline-comparison.xml in 8.0 arcade for 9.0 main?

I took a quick look. Here is what I did:

  1. Reviewed the prebuilt baseline-comparison.xml.
  2. Noted two classes of prebuilts as they come from two different project groupings.
  3. First grouping is from src/artifacts/obj/Release/Sdks/Microsoft.NET.Sdk/tools/project.assets.json which when looking at the changes led me to this conclusion.
  4. Second grouping is from src/artifacts/obj/Microsoft.DotNet.MSBuildSdkResolver/project.assets.json and src/artifacts/obj/Microsoft.DotNet.SdkResolver/project.assets.json which led me to review the version of the referenced prebuilts in the versions.props and version.details.xml and noticed this incoherency.

@elinor-fung

Copy link
Copy Markdown
Member

Second grouping from Microsoft.DotNet.MSBuildSdkResolver / Microsoft.DotNet.SdkResolver is resolved.

#35048 (comment) is all that is left.

@lewing

Copy link
Copy Markdown
MemberAuthor

@marcpopMSFT ping

@marcpopMSFT
marcpopMSFT merged commit 1bdc5a5 into mainSep 20, 2023
@marcpopMSFT
marcpopMSFT deleted the update-emsdk-manifest branch September 20, 2023 06:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-CodeFlowuntriagedRequest triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

18 participants

@lewing@jeffschwMSFT@mmitche@elinor-fung@dsplaisted@ViktorHofer@agocke@nagilson@marcpopMSFT@baronfel@vitek-karas@radical@marek-safar@MichaelSimons@joeloff@hoyosjs@LakshanF@mthalman