Skip to content

[browser] Use StaticWebAssets fingerprinting in Wasm SDK - #103755

Merged
lewing merged 63 commits into
dotnet:mainfrom
maraf:BrowserFingerprinting
Jul 23, 2024
Merged

[browser] Use StaticWebAssets fingerprinting in Wasm SDK#103755
lewing merged 63 commits into
dotnet:mainfrom
maraf:BrowserFingerprinting

Conversation

@maraf

@marafmaraf commented Jun 20, 2024

Copy link
Copy Markdown
Member
  • Fingerprinting is controlled by WasmFingerprintAssets (default true)
    • Supported in WasmSDK (not in WasmAppBuilder)
    • Some smoke WBT with false
  • New list of fingerprinted => non-fingerprinted asset names in boot config. We need to load (at least) System.Private.CoreLib with non-FP name and for lazy loading users pass also non-FP name
    • Temporary for .NET 9 before we have a more flexible boot config format in .NET 10

@marafmaraf added arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm labels Jun 20, 2024
@marafmaraf added this to the 9.0.0 milestone Jun 20, 2024
@marafmaraf self-assigned this Jun 20, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Comment threadsrc/mono/browser/runtime/loader/assets.ts Outdated
@build-analysisbuild-analysisBot mentioned this pull request Jul 23, 2024
@lewing

Copy link
Copy Markdown
Member

/ba-g previous run was green

@lewing
lewing merged commit 08d8070 into dotnet:mainJul 23, 2024
@lewing

Copy link
Copy Markdown
Member

@maraf please backport to release/9.0-preview7

@maraf

Copy link
Copy Markdown
MemberAuthor

/backport to release/9.0-preview7

@maraf
maraf deleted the BrowserFingerprinting branch July 23, 2024 04:40
@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/9.0-preview7: https://github.com/dotnet/runtime/actions/runs/10052831669

@github-actions

Copy link
Copy Markdown
Contributor

@maraf backporting to release/9.0-preview7 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Build and publish integration
Using index info to reconstruct a base tree...
M	src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets
M	src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/AssetsComputingHelper.cs
M	src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmBuildAssets.cs
M	src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmPublishAssets.cs
Falling back to patching base and 3-way merge...
Auto-merging src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmPublishAssets.cs
CONFLICT (content): Merge conflict in src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmPublishAssets.cs
Auto-merging src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmBuildAssets.cs
CONFLICT (content): Merge conflict in src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmBuildAssets.cs
Auto-merging src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/AssetsComputingHelper.cs
Auto-merging src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets
CONFLICT (content): Merge conflict in src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Build and publish integration
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions

Copy link
Copy Markdown
Contributor

@maraf an error occurred while backporting to release/9.0-preview7, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

maraf added a commit to maraf/runtime that referenced this pull request Jul 23, 2024
* Build and publish integration
* Make fingerpring work at runtime for assemblies
* Make fingerpring work at runtime for icu
* Remove version fingerprint check
* Check core assembly extension
* Typescript nits
* JSModules and SatelliteAssemblies
* DEBUG require newer SDK for testing
* Fix fingerprint for new publish assets
* Lazy loading and FP mapping boot json
* WBT file on disk checks
* WBT file on disk checks
* WBT file on disk checks
* WBT testmain no fingerprint
* WBT revert debug message
* AOT
* WBT fix ordering
* Fingerprinting without webcil
* Fix GenerateWasmBootJson when FP is off
* NoFingerprint WBT variant
* DEBUG try to run WBT without fingerprinting
* WBT make entry comparison order agnostic
* WBT smoke tests for no-fingerprinting
* Update sendtohelix-browser.targets
* Remove debug log
* Fix typo
* Fix regex matching
* Remove test for dotnet.js FP since we don't support that anymore
* Fix check for System.Private.CoreLib
* FP for dotnet.globalization.js
* Fingerprinting pdbs
* WBT fix file check
* Fingerprint segmentation-rules.json
* Fix loading pdb for fingerprinted lazy assembly
* Ensure lazy pdb is loaded
* Remove non-WasmSDK tests from non-FP category
* Revert drop for dotnet.js finterprinting
* Compute non-Fingerprinted virtualPath for pdb and resource as well
* Make debugger working with fingerprinted assemblies and pdbs
* DEBUG latest SDK for WBT
* DEBUG fix wbt installation
* Add WorkloadBuildTasks to WasmBuild.sln
* Fix WBT
* Revert escaping URL in debugger
* Fix lazy loading test and message emit in release config
* Fixes for MT after merge
* Skip WBT without workloads and without fingerprinting
* Turn off fingerprinting when targeting downlevel versions
* Git ignore *.d.ts.sha256
* Fix
* Update source-build-reference-packages to latest
* Revert "Update source-build-reference-packages to latest"
This reverts commit bef50ee.
* Fix the references
* Update Versions.props
* Update Versions.props
---------
Co-authored-by: Larry Ewing <lewing@microsoft.com>
@dsplaisted

Copy link
Copy Markdown
Member

@dsplaisted the changes in the sdk with the workload resolver don't seem very happy with our tricks to install the locally built workload for testing. Can you please take a look and help us figure out a solution.

@lewing I assume by now you figured this out? What was the issue?

lewing added a commit that referenced this pull request Jul 23, 2024
…105294)
* Build and publish integration
* Make fingerpring work at runtime for assemblies
* Make fingerpring work at runtime for icu
* Remove version fingerprint check
* Check core assembly extension
* Typescript nits
* JSModules and SatelliteAssemblies
* DEBUG require newer SDK for testing
* Fix fingerprint for new publish assets
* Lazy loading and FP mapping boot json
* WBT file on disk checks
* WBT file on disk checks
* WBT file on disk checks
* WBT testmain no fingerprint
* WBT revert debug message
* AOT
* WBT fix ordering
* Fingerprinting without webcil
* Fix GenerateWasmBootJson when FP is off
* NoFingerprint WBT variant
* DEBUG try to run WBT without fingerprinting
* WBT make entry comparison order agnostic
* WBT smoke tests for no-fingerprinting
* Update sendtohelix-browser.targets
* Remove debug log
* Fix typo
* Fix regex matching
* Remove test for dotnet.js FP since we don't support that anymore
* Fix check for System.Private.CoreLib
* FP for dotnet.globalization.js
* Fingerprinting pdbs
* WBT fix file check
* Fingerprint segmentation-rules.json
* Fix loading pdb for fingerprinted lazy assembly
* Ensure lazy pdb is loaded
* Remove non-WasmSDK tests from non-FP category
* Revert drop for dotnet.js finterprinting
* Compute non-Fingerprinted virtualPath for pdb and resource as well
* Make debugger working with fingerprinted assemblies and pdbs
* DEBUG latest SDK for WBT
* DEBUG fix wbt installation
* Add WorkloadBuildTasks to WasmBuild.sln
* Fix WBT
* Revert escaping URL in debugger
* Fix lazy loading test and message emit in release config
* Fixes for MT after merge
* Skip WBT without workloads and without fingerprinting
* Turn off fingerprinting when targeting downlevel versions
* Git ignore *.d.ts.sha256
* Fix
* Update source-build-reference-packages to latest
* Revert "Update source-build-reference-packages to latest"
This reverts commit bef50ee.
* Fix the references
* Update Versions.props
* Update Versions.props
---------
Co-authored-by: Larry Ewing <lewing@microsoft.com>
carlossanlop pushed a commit that referenced this pull request Jul 24, 2024
…ding (#105298)
* [browser] Use StaticWebAssets fingerprinting in Wasm SDK (#103755)
* Build and publish integration
* Make fingerpring work at runtime for assemblies
* Make fingerpring work at runtime for icu
* Remove version fingerprint check
* Check core assembly extension
* Typescript nits
* JSModules and SatelliteAssemblies
* DEBUG require newer SDK for testing
* Fix fingerprint for new publish assets
* Lazy loading and FP mapping boot json
* WBT file on disk checks
* WBT file on disk checks
* WBT file on disk checks
* WBT testmain no fingerprint
* WBT revert debug message
* AOT
* WBT fix ordering
* Fingerprinting without webcil
* Fix GenerateWasmBootJson when FP is off
* NoFingerprint WBT variant
* DEBUG try to run WBT without fingerprinting
* WBT make entry comparison order agnostic
* WBT smoke tests for no-fingerprinting
* Update sendtohelix-browser.targets
* Remove debug log
* Fix typo
* Fix regex matching
* Remove test for dotnet.js FP since we don't support that anymore
* Fix check for System.Private.CoreLib
* FP for dotnet.globalization.js
* Fingerprinting pdbs
* WBT fix file check
* Fingerprint segmentation-rules.json
* Fix loading pdb for fingerprinted lazy assembly
* Ensure lazy pdb is loaded
* Remove non-WasmSDK tests from non-FP category
* Revert drop for dotnet.js finterprinting
* Compute non-Fingerprinted virtualPath for pdb and resource as well
* Make debugger working with fingerprinted assemblies and pdbs
* DEBUG latest SDK for WBT
* DEBUG fix wbt installation
* Add WorkloadBuildTasks to WasmBuild.sln
* Fix WBT
* Revert escaping URL in debugger
* Fix lazy loading test and message emit in release config
* Fixes for MT after merge
* Skip WBT without workloads and without fingerprinting
* Turn off fingerprinting when targeting downlevel versions
* Git ignore *.d.ts.sha256
* Fix
* Update source-build-reference-packages to latest
* Revert "Update source-build-reference-packages to latest"
This reverts commit bef50ee.
* Fix the references
* Update Versions.props
* Update Versions.props
---------
Co-authored-by: Larry Ewing <lewing@microsoft.com>
* [browser] Extension agnostic lazy assembly loading (#104793)
* Fix damage from branch merging
---------
Co-authored-by: Larry Ewing <lewing@microsoft.com>
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Aug 23, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasmWebAssembly architecturearea-Build-monoos-browserBrowser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@maraf@lewing@dsplaisted@pavelsavara@javiercn