Skip to content

Move emsdk build back out of the VMR - #9995

Open
mmitche wants to merge 7 commits into
dotnet:mainfrom
mmitche:mmitche/external-emsdk
Open

mmitche wants to merge 7 commits into
dotnet:mainfrom
mmitche:mmitche/external-emsdk

Conversation

@mmitche

@mmitche mmitche commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Stop building emsdk in the VMR. emsdk is built by the standalone dotnet/emsdk official build again (dotnet/emsdk#2042) and flows into the VMR as regular package dependencies.

  • Remove emsdk from SharedRepositoryReference and the runtime/sdk RepositoryReferences.
  • The SDK uses $(MicrosoftNETRuntimeEmscriptenInternalPackageVersion) from its own Version.Details.props for the workload manifest's EmsdkVersion and for the raw-pack and payload-MSI downloads in workloads.csproj. Previously the payload MSIs used DotNet1xxRuntimeVersion, which only worked while the VMR built emsdk with the runtime version. With Restore official emsdk product build emsdk#2042, the Internal marker version is always identical to the shipping toolchain pack versions, including in stable builds.
  • Later SDK bands: the root eng/Version.Details.xml lists Microsoft.NET.Runtime.Emscripten.Internal. The emsdk subscription updates it together with src/runtime and src/sdk. When snapping a new band, add CoherentParentDependency="Microsoft.NETCore.App.Ref" to Internal in the band's src/sdk/eng/Version.Details.xml. Darc then resolves it from the 1xx VMR root at the commit that Microsoft.NETCore.App.Ref points to, in the same PR whenever the 1xx package flow updates it. Backflow carries the version to dotnet/sdk. This step is added to docs/VMR-Managing-SDK-Bands.md.

Rollout

  1. Merge Restore official emsdk product build emsdk#2042 and get an official build publishing to .NET 12.
  2. Merge this PR.
  3. Maestro configuration change (maestro-configuration PR 69298):
    • Replace the emsdk ↔ VMR codeflow with a dependency subscription from dotnet/emsdk to the VMR that targets .,src/runtime,src/sdk.
    • Remove the VMR → emsdk backflow.
    • Point the llvm-project and node subscriptions at dotnet/emsdk instead of src/emsdk.

The emsdk sources and source mapping in the VMR stay for now and are removed separately once codeflow is gone.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team October 6, 2026 16:53
@mmitche
mmitche marked this pull request as ready for review October 6, 2026 16:55
@mmitche
mmitche requested review from a team as code owners October 6, 2026 16:55
Copilot AI balanced review requested due to automatic review settings October 6, 2026 16:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The release guard can permit prerelease Emscripten packages in builds using DotNetFinalVersionKind=release.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Moves Emscripten package production outside the VMR while preserving SDK workload packaging and version flow.

Changes:

  • Removes emsdk build-graph dependencies.
  • Adds an SDK-produced version marker for upstack consumption.
  • Separates Emscripten versions from runtime and validates package selection.
File Description
src/​sdk/​src/​Workloads/​VSInsertion/​workloads.csproj Uses selected Emscripten versions for packs and MSIs.
src/​sdk/​src/​Workloads/​README.md Documents the package-flow contract.
src/​sdk/​src/​Workloads/​Manifests/​Microsoft.NET.Workload.Emscripten.Current.Manifest/​Microsoft.NET.Workload.Emscripten.Current.Manifest.proj Generates manifests with the selected version.
src/​sdk/​src/​Workloads/​Manifests/​manifest-packages.csproj Adds marker-package traversal.
src/​sdk/​src/​Workloads/​EmscriptenVersion/​Microsoft.NET.Sdk.Emscripten.Version.Internal.proj Produces the version marker package.
src/​sdk/​src/​Workloads/​Emscripten.targets Adds version and marker validation.
src/​sdk/​src/​Workloads/​Emscripten.props Selects 1xx or upstack versions.
src/​sdk/​eng/​Publishing.props Configures marker publication visibility.
src/​sdk/​.github/​memory/​FILE_MAP.md Updates workload-area guidance.
src/​sdk/​.github/​memory/​ARCHITECTURE.md Documents the new architecture.
repo-projects/​sdk.proj Removes emsdk dependency and forwards marker version.
repo-projects/​runtime.proj Removes browser-runtime emsdk dependency.
eng/​VmrLayout.props Removes emsdk shared-component classification.
docs/​VMR-External-Emsdk.md Documents VMR-wide design and rollout.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Link the workload manifest parser into sdk-tasks and defer version selection until manifest generation. Remove unused upstack Emscripten payload-MSI acquisition while preserving manifest-MSI reuse and 1xx generation.

Co-authored-by: Copilot <[email protected]>
@mmitche mmitche changed the title Consume external emsdk packages in the VMR Move emsdk build back out of the VMR Oct 7, 2026
@mmitche

mmitche commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

/azp list

@mmitche

mmitche commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

/azp run dotnet-unified-build-full

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mmitche

mmitche commented Oct 9, 2026 •

Copy link
Copy Markdown
Member Author

Official build re-introduction: dotnet/emsdk#1943

ViktorHofer and others added 2 commits October 29, 2026 15:12
…ding 1xx manifest

Later SDK bands pin Microsoft.NET.Runtime.Emscripten.Internal with
CoherentParentDependency="Microsoft.NETCore.App.Ref" so darc keeps it in sync
with the 1xx VMR commit. The root eng/Version.Details.xml carries the
dependency so darc can resolve it. This removes the ReadEmscriptenManifest
task and associated plumbing; the sdk uses the Internal version directly.

Co-authored-by: Copilot App <[email protected]>
@akoeplinger

Copy link
Copy Markdown
Member

@mmitche I pushed 5e06b76, which reworks how later SDK bands get the emsdk version, and updated the description.

  • Instead of ReadEmscriptenManifest (reading the 1xx workload manifest at build time), later bands now use darc's CoherentParentDependency. Internal in the band's src/sdk/eng/Version.Details.xml is marked coherent with Microsoft.NETCore.App.Ref, and darc resolves it from the 1xx VMR's root eng/Version.Details.xml. The attribute has to be added when snapping a band, so I added that step to docs/VMR-Managing-SDK-Bands.md.
  • The sdk now just uses $(MicrosoftNETRuntimeEmscriptenInternalPackageVersion), the same in VMR and standalone dotnet/sdk builds. That let me revert sdk-tasks, src/Workloads and .github/memory to main, apart from the version property in the manifest project and workloads.csproj.
  • The prerelease guard is gone too: Restore official emsdk product build emsdk#2042 keeps the Internal marker at the same version as the shipping packs, so it's stable in stable builds. runtime's AcquireEmscriptenSdk.targets already relies on that.
  • I dropped docs/VMR-External-Emsdk.md. The relevant notes are in the root Version.Details.xml comment and the band-snap doc.

…emsdk-cpd

# Conflicts:
#	eng/Version.Details.props
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants