[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 <[email protected]>
|
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 <[email protected]>
…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.
| // - blazor.boot.json (pre-net10) | ||
| if (File.Exists(Path.Combine(binFrameworkDir, "blazor.boot.json"))) | ||
| return "blazor.boot.json"; | ||
|
|
| @@ -88,7 +88,7 @@ export function configureEmscriptenStartup (module: DotnetModuleInternal): void | |||
| module.mainScriptUrlOrBlob = loaderHelpers.scriptUrl;// this is needed by worker threads | |||
|
|
|||
| // these all could be overridden on DotnetModuleConfig, we are chaing them to async below, as opposed to emscripten | |||
… 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