Repository navigation
refactor(wasm)!: Remove interop whose JavaScript is no longer shipped (backport #25944) - #26286
Closed
mergify[bot] wants to merge 1 commit into
Closed
mergify[bot] wants to merge 1 commit into
mergify[bot] wants to merge 1 commit into
Conversation
WebAssemblyRuntime.InvokeAsync and InvokeJSUnmarshalled called JavaScript that only the WebAssembly DOM heads loaded, so they failed in every Skia app (fixes #24515). TSInteropMarshaller, a CoreWindow SetCursor import and an uncompiled BrowserPointerInputSource copy go with them. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 13eb00b)
1 of 5 tasks
Contributor
Author
|
This pull request is closed, so it cannot be queued. Reopen it to get the box back. |
Contributor
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-26286/docs/index.html |
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
The build 245211 did not find any UI Test snapshots differences. |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: closes #24515
PR Type:
🔄 Refactoring (breaking: public API removed)
What changed? 🚀
WebAssemblyRuntime.InvokeAsyncandWebAssemblyRuntime.InvokeJSUnmarshalledcalled JavaScript (Uno.UI.Interop.AsyncInteropHelper,MonoSupport.jsCallDispatcher) that only the WebAssembly DOM heads loaded. Those heads were removed in 7.0 and the sources deleted in #24351, so both APIs failed at runtime in every app. By the issue's inspection of 6.7, they never worked on the Skia renderer either.Restoring them would mean shipping eval-based interop again:
InvokeAsynctakes JavaScript as a string, which is what #24429 is trying to remove. So they are removed as a documented 7.0 break, next to the rest of the legacy interop the migration guide already lists.Removed
WebAssemblyRuntime.InvokeAsync(string)andInvokeAsync(string, CancellationToken), with theirDispatchAsyncResult/DispatchAsyncError[JSExport]callbacks and the pending-task bookkeeping.WebAssemblyRuntime.InvokeJSUnmarshalled(string, IntPtr)and(string, IntPtr, IntPtr), plus the internal overloads,GetMethodId,MethodMapand the[JSImport]targetingMonoSupport.jsCallDispatcher.TSInteropMarshaller: internal, and the only caller ofInvokeJSUnmarshalled. The bindings generator that produced its users is gone. This emptiesUno.Foundation.Interop, so the three storage files that still imported it lose the unusedusing.CoreWindow.NativeMethods.SetCursor: an import targetingUno.UI.WindowManager. Its only caller wassrc/Uno.UI/Runtime/BrowserPointerInputSource.wasm.cs, a DOM-head leftover that no project compiles. That file is removed too. The Skia browser host's ownBrowserPointerInputSourcesets the cursor throughWebAssemblyWindowWrapper.setCursor.Docs:
[JSImport]Task<string>example replacingInvokeAsync.PackageDiffIgnore.xmlgets entries for the six removed public members, in both the 6.6 and 6.7 baseline sets, like the existingInvokeJSWithInteropentry.Downstream: an org-wide code search finds
InvokeAsyncin Uno.Microsoft.Identity.Client (last pushed in 2020, built against Uno 3) and the Uno.Figma plugin. Nothing outside this repo callsInvokeJSUnmarshalledorTSInteropMarshaller.Validation
Uno.Foundation.Runtime.WebAssembly,Uno.WinRT.WasmandUno.UI.Runtime.WebAssembly.Browserbuild with analyzers on.Given_ApplicationDataContainer,Given_StorageFolderandGiven_BrowserPointerInputSourcepass 89/89, with noMonoSupportorAsyncInteropHelpererrors in the console.markdownlintwithbuild/.markdownlint.jsonandcspellare clean on the migration guide.PR Checklist ✅
Screenshots Compare Test Runresults.Removes
WebAssemblyRuntime.InvokeAsyncandInvokeJSUnmarshalled, which no longer worked at runtime. Migrate to[JSImport]/[JSExport]; the 7.0 migration guide shows the replacement.🤖 Generated with Claude Code
This is an automatic backport of pull request #25944 done by [Mergify](https://mergify.com).