-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[browser] Map integrity from boot config to asset hash #122290
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
base: main
Are you sure you want to change the base?
Conversation
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 addresses issue #121876 by mapping the integrity property from boot config to the internal hash property used by asset loading. The changes rename the public-facing hash field to integrity in asset type definitions while maintaining backward compatibility by internally mapping integrity to hash in the loader.
Key Changes
- Renamed
hashtointegrityin public asset type definitions (WasmAsset, AssemblyAsset, PdbAsset, VfsAsset, IcuAsset) - Added runtime mapping logic to convert
integritytohashfor internal use in asset loading - Added test case to verify assets have integrity values
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/mono/browser/runtime/types/index.ts | Renamed hash property to integrity in asset type definitions |
| src/mono/browser/runtime/dotnet.d.ts | Updated TypeScript declarations to reflect integrity property rename |
| src/mono/browser/runtime/loader/assets.ts | Added logic to map integrity to internal hash property in two places |
| src/mono/wasm/Wasm.Build.Tests/ModuleConfigTests.cs | Added test to verify assets have integrity values |
| src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js | Added test case handler and exit condition for AssetIntegrity test |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
/backport to release/10.0 |
|
Started backporting to |
|
Based on offline discussion, we might want to fix the problem differently |
Assets generated by boot config generator contains field
integrity, but internal assets structure contains fieldhash. This PR copies the value fromintegritytohashto minimize the diff. It is a regression from boot config structure change from #116300.Fixes #121876