Repository navigation
[blazor] Extract current dotnet.d.ts from runtime pack for repository build - #70344
Conversation
Co-authored-by: Copilot App <[email protected]>
|
Hey @dotnet/aspnet-build, looks like this PR is something you want to take a look at. |
There was a problem hiding this comment.
🔵 Needs a closer look
Missing SDK/Arcade dependencies leave restore-time package-path resolution and incremental-copy behavior unverified, requiring clean-checkout validation on Windows and Linux, including IDE behavior.
No open issues 🎉
What changed in this PR
This PR replaces Blazor’s checked-in runtime TypeScript declarations with declarations restored from the runtime pack, keeping JavaScript builds aligned with the repository’s runtime dependency version.
Changes:
- Restore
dotnet.d.tsfrom the runtime pack, with source-only and design-time copy exclusions. - Integrate declaration restore and incremental build tracking into the npm workspace.
- Document the restore prerequisite for direct npm builds.
| File | Description |
|---|---|
src/Components/dotnet-runtime-js/dotnet.d.ts |
Removes the checked-in generated declarations. |
src/Components/dotnet-runtime-js/.gitignore |
Ignores the restored declaration file. |
eng/tools/GenerateFiles/GenerateFiles.csproj |
Downloads the runtime pack and copies declarations with timestamp-based invalidation. |
eng/Npm.Workspace.nodeproj |
Restores declarations independently of npm dependency freshness and tracks them as build inputs. |
docs/BuildFromSource.md |
Explains declaration generation and when to rerun restore. |
Review effort: Balanced
|
/review |
|
/ba-g Failures is not related The remaining failure is ServerRoutingTest.NavigationLock_CanBlockExternalNavigation in the Mono-server E2E leg: the browser stays at /subdir/ instead of navigating to //myexternalpath3. This PR only replaces the checked-in runtime TypeScript declaration with the runtime-pack copy and wires its restore into the repository build; it does not change navigation implementation, server behavior, or the test. All repository build jobs passed, and CoreCLR and Mono-client/WebAssembly E2E passed. Build Insights reports a 31.6% historical failure rate for this test. The failure repeated in builds 1667457 and 1667612, so this is an operator-directed Build Analysis override, not a claim that a retry verified the test or that the failure matched a known issue. Note This comment was generated with the assistance of GitHub Copilot. |
|
✅ No documentation PR was created. Confidence that documentation is needed: 3% No docs needed: the PR only changes how the repository build obtains dotnet.d.ts (build infrastructure), with no user-facing change. Documentation surfaces considered
|
[blazor] Extract current dotnet.d.ts from runtime pack for repository build
Restore Blazor runtime TypeScript declarations from the flowed runtime pack.
Description
Replace the checked-in generated
src/Components/dotnet-runtime-js/dotnet.d.tswith the declaration supplied byMicrosoft.NETCore.App.Runtime.browser-wasm, using the existing flowedMicrosoftNETCoreAppRefVersion.The existing GenerateFiles restore copies the declaration into the ignored npm workspace path. The npm workspace restore also invokes this step even when npm dependencies are already restored, and explicitly tracks the declaration as a build input before it exists. Repeated restores preserve timestamps; runtime version changes touch the copied declaration so upgrades and downgrades invalidate the JavaScript build. Source-only builds exclude the runtime-pack download, and source-only/design-time invocations skip copying it.
Document the restore prerequisite for direct npm builds. No npm manifests or lockfiles are changed, and there are no public API changes. Existing JavaScript coverage is reused; no permanent tests were added for this build-only change.
Validation after merging the latest
origin/main:source activate.sh && dotnet msbuild eng/Npm.Workspace.nodeproj -t:Restore -v:minimal -nologo— passed.npm run build --workspace @microsoft/microsoft.aspnetcore.components.web.js— passed, Debug and Release bundles.npm run test --workspace @microsoft/microsoft.aspnetcore.components.web.js -- --runInBand— passed, 15 suites / 299 tests../eng/build.sh --projects "$PWD/eng/Npm.Workspace.nodeproj" --build-nodejs --no-build-managed --no-build-native --no-build-java --pack— passed with zero warnings and errors; produced the three shipping npm packages.Full managed builds and Windows/Linux execution were not run. The area-wide lint command has existing failures; comparison against the baseline found no new diagnostics from this change.
Related issue: N/A; no linked issue was supplied.
Note
This PR description was generated with the assistance of GitHub Copilot.