-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[browser] Expect fingerprint on dotnet.js for preloading #120694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
d165553 to
60b7af6
Compare
|
/backport to release/10.0 |
|
Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/18528336397 |
|
This requires an SDK for WBT with dotnet/sdk#51274 |
…ng (#120746) Backport of #120694 to release/10.0 In dotnet/sdk#50949 we changed the identity of StaticWebAsset to contain fingerprint (dotnet.native.wasm -> dotnet.native.FP.wasm). This PR accommodates this when checking for dotnet.native.wasm asset from build. The SDK change didn't flown to the runtime yet, and so Wasm.Build.Tests won't test it yet. Fixes dotnet/aspnetcore#64011 /cc @maraf ## Customer Impact - [ ] Customer reported - [x] Found internally [[Select one or both of the boxes. Describe how this issue impacts customers, citing the expected and actual behaviors and scope of the issue. If customer-reported, provide the issue number.]](dotnet/aspnetcore#64011) ## Regression - [x] Yes - [ ] No Introduced in dotnet/sdk#50949 which added a fingerprint to the msbuild item identity ## Testing Manual and automated tests. ## Risk Low. The change are very scoped to target and items used only by preloading. **IMPORTANT**: If this backport is for a servicing release, please verify that: - The PR target branch is `release/X.0-staging`, not `release/X.0`. ## Package authoring no longer needed in .NET 9 **IMPORTANT**: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version. Keep in mind that we still need package authoring in .NET 8 and older versions. --------- Co-authored-by: Marek Fišera <[email protected]> Co-authored-by: Larry Ewing <[email protected]>
|
Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it. |
|
This is a fix from .NET 10 timeframe. Landed in .NET 10, but |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes the detection of fingerprinted dotnet.js files for preloading in WebAssembly browser builds. The change ensures that when fingerprinting is enabled for the boot config file (dotnet.js), the build system correctly identifies the fingerprinted version (e.g., dotnet.abc123.js) and applies preload properties to it.
Key changes:
- Updated MSBuild targets to handle both fingerprinted and non-fingerprinted boot config file matching
- Expanded test coverage to validate all combinations of publish/build, fingerprinting, and preload settings
- Added a helper method to count occurrences in test assertions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets | Added logic to match boot config files with fingerprints by splitting filename and extension, then constructing the pattern with %(Fingerprint) metadata |
| src/mono/wasm/Wasm.Build.Tests/PreloadingTests.cs | Expanded test matrix from 4 to 8 cases to cover the new preloadAssets parameter, added CountOccurrences helper method for verification, and removed unnecessary null initialization |
Expect fingerprint in SWA identity when searching for
dotnet.jsto apply preloading properties to.The change is build-time only, we don't need to update the target for publish, because the
publish.dotnet.jsdoesn't get fingerprint in the identity.Contributes to dotnet/aspnetcore#64011