Skip to content
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

[browser] Use StaticWebAssets fingerprinting in Wasm SDK #103755

Merged
merged 63 commits into from
Jul 23, 2024

Conversation

maraf
Copy link
Member

@maraf maraf commented Jun 20, 2024

  • 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

@maraf maraf added arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm labels Jun 20, 2024
@maraf maraf added this to the 9.0.0 milestone Jun 20, 2024
@maraf maraf self-assigned this Jun 20, 2024
Copy link
Contributor

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

@lewing
Copy link
Member

lewing commented Jul 23, 2024

/ba-g previous run was green

@lewing lewing merged commit 08d8070 into dotnet:main Jul 23, 2024
11 of 70 checks passed
@lewing
Copy link
Member

lewing commented Jul 23, 2024

@maraf please backport to release/9.0-preview7

@maraf
Copy link
Member Author

maraf commented Jul 23, 2024

/backport to release/9.0-preview7

@maraf maraf deleted the BrowserFingerprinting branch July 23, 2024 04:40
Copy link
Contributor

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

Copy link
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!

Copy link
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
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-actions github-actions bot locked and limited conversation to collaborators Aug 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants