Skip to content

[browser] Use whole assembly name when looking for already loaded assemblies #96018

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

Merged
merged 6 commits into from
Jan 17, 2024

Conversation

maraf
Copy link
Member

@maraf maraf commented Dec 14, 2023

In lazy assembly loading we are checking whether the requested assembly wasn't already loaded. This was previously done by "contains" in loaded assembly URLs. Now we are storing only loaded assembly names and in lazy loading checking for whole assembly name

Fixes #95381

@maraf maraf added arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm labels Dec 14, 2023
@maraf maraf added this to the 9.0.0 milestone Dec 14, 2023
@ghost
Copy link

ghost commented Dec 14, 2023

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

Issue Details

In lazy assembly loading we are checking whether the requested assembly wasn't already loaded. This was previously done by "contains" in loaded assembly URLs. Now we are storing only loaded assembly names and in lazy loading checking for whole assembly name

Fixes #95381

TODO

  • Add test
Author: maraf
Assignees: -
Labels:

arch-wasm, area-System.Runtime.InteropServices.JavaScript, os-browser

Milestone: 9.0.0

@maraf maraf marked this pull request as ready for review January 17, 2024 10:07
@maraf maraf requested a review from pavelsavara January 17, 2024 10:08
@maraf
Copy link
Member Author

maraf commented Jan 17, 2024

Failure is #97092 and is unrelated

@maraf maraf merged commit f2c3541 into dotnet:main Jan 17, 2024
@maraf maraf deleted the BrowserFixLazyAssemblyLoadedCheck branch January 17, 2024 13:56
@maraf
Copy link
Member Author

maraf commented Jan 17, 2024

/backport to release/8.0-staging

Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/7556764411

Copy link
Contributor

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

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Put asset name in loaderHelpers.loadedAssemblies and check for asset name in lazy loading
Applying: Update lazy loading test to match existing assembly name partially
Using index info to reconstruct a base tree...
M	src/mono/wasm/testassets/WasmBasicTestApp/LazyLoadingTest.cs
M	src/mono/wasm/testassets/WasmBasicTestApp/WasmBasicTestApp.csproj
Falling back to patching base and 3-way merge...
Auto-merging src/mono/wasm/testassets/WasmBasicTestApp/App/WasmBasicTestApp.csproj
Auto-merging src/mono/wasm/testassets/WasmBasicTestApp/App/LazyLoadingTest.cs
CONFLICT (content): Merge conflict in src/mono/wasm/testassets/WasmBasicTestApp/App/LazyLoadingTest.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Update lazy loading test to match existing assembly name partially
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
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/8.0-staging, please check the run log for details!

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

tmds pushed a commit to tmds/runtime that referenced this pull request Jan 23, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.NET 8 blazor .wasm Lazy Loaded Assemblies throws runtime exception and fails to load
2 participants