[browser] Remove public WasmInlineBootConfig, WasmBootConfigFileName properties#125645
[browser] Remove public WasmInlineBootConfig, WasmBootConfigFileName properties#125645
Conversation
… and withConfigSrc API Drop support for overriding the boot config file name via public MSBuild properties (WasmInlineBootConfig, WasmBootConfigFileName) and the withConfigSrc TypeScript API. Users should either use the default embedded boot config or implement their own solution. - Remove public MSBuild property references; private defaults unchanged - Remove withConfigSrc from TypeScript API (host-builder, run.ts, types) - Move configSrc from public DotnetModuleConfig to internal type - Remove OverrideBootConfigName test and test asset - Remove BootConfigFileName from test infrastructure Fixes #124947 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
There was a problem hiding this comment.
Pull request overview
This PR removes public customization hooks for the WASM boot config source/name (MSBuild properties WasmInlineBootConfig / WasmBootConfigFileName and the TypeScript withConfigSrc API), aligning the browser runtime and tests with using the default embedded boot config or fully custom user solutions.
Changes:
- Removes
withConfigSrcfrom the browser runtime’s public TypeScript API surface (types +HostBuilderimplementation) and movesconfigSrcto internal module typing. - Removes public MSBuild property wiring for boot config override and keeps internal defaults for
_WasmInlineBootConfig/_WasmBootConfigFileName. - Deletes the
OverrideBootConfigNametest scenario and removesBootConfigFileNameplumbing from the WASM build test infrastructure.
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/native/libs/Common/JavaScript/types/public-api.ts | Removes public configSrc mention/field from the common JS public API typings. |
| src/native/libs/Common/JavaScript/loader/host-builder.ts | Drops the unsupported withConfigSrc method from the common JS host builder. |
| src/native/libs/Common/JavaScript/loader/dotnet.d.ts | Updates generated typings to remove configSrc from module config. |
| src/mono/browser/runtime/types/index.ts | Removes withConfigSrc and configSrc from the public browser runtime typings. |
| src/mono/browser/runtime/dotnet.d.ts | Mirrors public API removal in the .d.ts surface. |
| src/mono/browser/runtime/loader/run.ts | Removes HostBuilder.withConfigSrc implementation. |
| src/mono/browser/runtime/types/internal.ts | Adds configSrc to internal module typing so internal loader code can still use it. |
| src/mono/browser/runtime/startup.ts | Updates comments to reflect removal of configSrc from public configuration. |
| src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets | Stops copying public MSBuild properties into internal boot config selection logic. |
| src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js | Removes the OverrideBootConfigName JS test scenario code path. |
| src/mono/wasm/testassets/WasmBasicTestApp/App/OverrideBootConfigNameTest.cs | Deletes the managed test asset used only by the removed scenario. |
| src/mono/wasm/Wasm.Build.Tests/ModuleConfigTests.cs | Removes the OverrideBootConfigName test. |
| src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs | Removes passing WasmBootConfigFileName via test build options. |
| src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs | Removes boot-config-name-dependent expectations in bundle assertions. |
| src/mono/wasm/Wasm.Build.Tests/ProjectProviderBase.cs | Updates boot config assertion path resolution to no longer depend on BootConfigFileName. |
| src/mono/wasm/Wasm.Build.Tests/BrowserStructures/MSBuildOptions.cs | Removes BootConfigFileName from base build/publish option records. |
| src/mono/wasm/Wasm.Build.Tests/BrowserStructures/BuildOptions.cs | Removes BootConfigFileName from build options. |
| src/mono/wasm/Wasm.Build.Tests/BrowserStructures/PublishOptions.cs | Removes BootConfigFileName from publish options. |
You can also share your feedback on Copilot code review. Take the survey.
- Add GetDefaultBootConfigFileName that probes for blazor.boot.json (pre-net10) before defaulting to dotnet.js, fixing compatibility with older TFMs in WorkloadsTestPreviousVersions scenarios - Fix comment grammar in startup.ts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rideBootConfigName
There was a problem hiding this comment.
Pull request overview
Removes public knobs for overriding the WASM boot config file name (MSBuild properties and the withConfigSrc TypeScript API) to avoid unsupported/unstable scenarios (notably the OverrideBootConfigName timeout in #124947) and simplifies the related test infrastructure.
Changes:
- Remove
withConfigSrcfrom the browser runtime TypeScript API surface and moveconfigSrcto internal-only types. - Stop flowing public MSBuild properties (
WasmInlineBootConfig,WasmBootConfigFileName) into the SDK’s internal properties; keep internal defaults. - Remove the
OverrideBootConfigNametest case, related test asset code, andBootConfigFileNameplumbing in WASM build tests.
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/native/libs/Common/JavaScript/types/public-api.ts | Removes configSrc from the public DotnetModuleConfig type and trims related doc text. |
| src/native/libs/Common/JavaScript/loader/host-builder.ts | Drops the withConfigSrc API (previously throwing) from the host builder implementation. |
| src/native/libs/Common/JavaScript/loader/dotnet.d.ts | Updates generated typings to remove configSrc from DotnetModuleConfig. |
| src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js | Removes the OverrideBootConfigName JS scenario and associated output. |
| src/mono/wasm/testassets/WasmBasicTestApp/App/OverrideBootConfigNameTest.cs | Deletes the managed test used by the removed scenario. |
| src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs | Removes boot-config-name override expectations from bundle file checks. |
| src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs | Removes passing -p:WasmBootConfigFileName=... from build/publish helpers. |
| src/mono/wasm/Wasm.Build.Tests/ProjectProviderBase.cs | Switches boot config assertions to use a “default boot config filename” probe instead of BootConfigFileName options. |
| src/mono/wasm/Wasm.Build.Tests/ModuleConfigTests.cs | Removes the OverrideBootConfigName test coverage. |
| src/mono/wasm/Wasm.Build.Tests/BrowserStructures/PublishOptions.cs | Removes BootConfigFileName from publish option records. |
| src/mono/wasm/Wasm.Build.Tests/BrowserStructures/MSBuildOptions.cs | Removes BootConfigFileName from the shared MSBuild options record. |
| src/mono/wasm/Wasm.Build.Tests/BrowserStructures/BuildOptions.cs | Removes BootConfigFileName from build option records. |
| src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets | Stops honoring public WasmInlineBootConfig / WasmBootConfigFileName and relies on internal defaults. |
| src/mono/browser/runtime/types/internal.ts | Moves configSrc to internal module typing (EmscriptenModuleInternal). |
| src/mono/browser/runtime/types/index.ts | Removes withConfigSrc and configSrc from the public browser runtime types. |
| src/mono/browser/runtime/startup.ts | Updates comments related to default startup sequence; minor text changes. |
| src/mono/browser/runtime/loader/run.ts | Removes the withConfigSrc implementation that merged configSrc into the module. |
| src/mono/browser/runtime/dotnet.d.ts | Updates generated typings to remove withConfigSrc and configSrc. |
You can also share your feedback on Copilot code review. Take the survey.
- Add missing dotnet.boot.js probe in GetDefaultBootConfigFileName so non-inline boot config layouts are detected correctly - Fix typo: 'chaing' -> 'chaining' in startup.ts comment Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Since withConfigSrc was the only way to set module.configSrc and it has been removed, the field is always undefined on entry. Replace it with a local variable in mono_wasm_load_config and pass it as a parameter to loadBootConfig. Remove the field from EmscriptenModuleInternal. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR removes previously public ways to override the WASM boot config source/name (MSBuild properties WasmInlineBootConfig/WasmBootConfigFileName and the withConfigSrc TypeScript API), aligning behavior around the default embedded boot config and deleting the associated test coverage that was timing out (Issue #124947).
Changes:
- Remove
withConfigSrcandconfigSrcfrom public TS APIs/types; keepconfigSrcas an internal module detail. - Remove public MSBuild property plumbing for overriding inline boot config / boot config file name; keep internal defaults.
- Delete the
OverrideBootConfigNametest scenario, infrastructure hooks, and test asset code.
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/native/libs/Common/JavaScript/types/public-api.ts | Removes configSrc from public module config typing and related doc text. |
| src/native/libs/Common/JavaScript/loader/host-builder.ts | Drops the withConfigSrc stub that threw at runtime. |
| src/native/libs/Common/JavaScript/loader/dotnet.d.ts | Mirrors public typing changes by removing configSrc from DotnetModuleConfig. |
| src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js | Removes the OverrideBootConfigName scenario wiring. |
| src/mono/wasm/testassets/WasmBasicTestApp/App/OverrideBootConfigNameTest.cs | Deletes the managed test entrypoint used only by the removed scenario. |
| src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs | Removes bundle-assert logic that depended on an overrideable boot config filename. |
| src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTestsBase.cs | Removes passing -p:WasmBootConfigFileName=... from test builds. |
| src/mono/wasm/Wasm.Build.Tests/ProjectProviderBase.cs | Switches boot config resolution for assertions to a “default filename” probe. |
| src/mono/wasm/Wasm.Build.Tests/ModuleConfigTests.cs | Removes the OverrideBootConfigName test coverage. |
| src/mono/wasm/Wasm.Build.Tests/BrowserStructures/PublishOptions.cs | Removes BootConfigFileName from publish option records. |
| src/mono/wasm/Wasm.Build.Tests/BrowserStructures/MSBuildOptions.cs | Removes BootConfigFileName from the shared options record. |
| src/mono/wasm/Wasm.Build.Tests/BrowserStructures/BuildOptions.cs | Removes BootConfigFileName from build option records. |
| src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets | Stops reading public MSBuild properties for boot config overrides; keeps internal defaults. |
| src/mono/browser/runtime/types/internal.ts | Moves configSrc onto an internal module type surface. |
| src/mono/browser/runtime/types/index.ts | Removes withConfigSrc and configSrc from the public runtime TS API/types. |
| src/mono/browser/runtime/startup.ts | Updates comments to reflect removal of configSrc from public override points. |
| src/mono/browser/runtime/loader/run.ts | Removes HostBuilder.withConfigSrc implementation. |
| src/mono/browser/runtime/dotnet.d.ts | Updates public d.ts to remove withConfigSrc and configSrc. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Config is now always embedded (inline in dotnet.js), so the separate file loading path (loadBootConfig, fetchBootConfig, readBootConfigResponse) is dead code. Remove it along with the BootModule type import and unused polyfill/asset imports. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Keep an empty/dummy withConfigSrc method with @deprecated JSDoc note in both the Common JavaScript loader and Mono browser runtime hosts, so that existing consumers get a deprecation warning instead of a hard break. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🤖 Copilot Code Review — PR #125645Holistic AssessmentMotivation: This PR removes the separate boot config file loading mechanism ( Approach: The approach is sound: remove the dead internal loading machinery, keep a deprecated no-op Summary: Detailed Findings✅ Dead Code Removal — Correct and completeThe removal of
✅ Deprecated
|
… and withConfigSrc API
Drop support for overriding the boot config file name via public MSBuild properties (WasmInlineBootConfig, WasmBootConfigFileName) and the withConfigSrc TypeScript API. Users should either use the default embedded boot config or implement their own solution.
Fixes #124947