Skip to content

refactor(wasm)!: Remove interop whose JavaScript is no longer shipped - #25944

Merged
ramezgerges merged 1 commit into
unoplatform:masterfrom
ramezgerges:dev/rara/remove-dead-wasm-interop
Nov 10, 2026
Merged

ramezgerges merged 1 commit into
unoplatform:masterfrom
ramezgerges:dev/rara/remove-dead-wasm-interop

Conversation

@ramezgerges

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #24515

PR Type:

🔄 Refactoring (breaking: public API removed)

What changed? 🚀

WebAssemblyRuntime.InvokeAsync and WebAssemblyRuntime.InvokeJSUnmarshalled called 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: InvokeAsync takes 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) and InvokeAsync(string, CancellationToken), with their DispatchAsyncResult / DispatchAsyncError [JSExport] callbacks and the pending-task bookkeeping.
  • WebAssemblyRuntime.InvokeJSUnmarshalled(string, IntPtr) and (string, IntPtr, IntPtr), plus the internal overloads, GetMethodId, MethodMap and the [JSImport] targeting MonoSupport.jsCallDispatcher.
  • TSInteropMarshaller: internal, and the only caller of InvokeJSUnmarshalled. The bindings generator that produced its users is gone. This empties Uno.Foundation.Interop, so the three storage files that still imported it lose the unused using.
  • CoreWindow.NativeMethods.SetCursor: an import targeting Uno.UI.WindowManager. Its only caller was src/Uno.UI/Runtime/BrowserPointerInputSource.wasm.cs, a DOM-head leftover that no project compiles. That file is removed too. The Skia browser host's own BrowserPointerInputSource sets the cursor through WebAssemblyWindowWrapper.setCursor.

Docs:

  • The migration guide gets an entry next to the existing legacy-interop bullet, with a [JSImport] Task<string> example replacing InvokeAsync.
  • PackageDiffIgnore.xml gets entries for the six removed public members, in both the 6.6 and 6.7 baseline sets, like the existing InvokeJSWithInterop entry.

Downstream: an org-wide code search finds InvokeAsync in Uno.Microsoft.Identity.Client (last pushed in 2020, built against Uno 3) and the Uno.Figma plugin. Nothing outside this repo calls InvokeJSUnmarshalled or TSInteropMarshaller.

Validation

  • Compile: Uno.Foundation.Runtime.WebAssembly, Uno.WinRT.Wasm and Uno.UI.Runtime.WebAssembly.Browser build with analyzers on.
  • WebAssembly runtime: SamplesApp, published from a clean build and run in headless Edge. Given_ApplicationDataContainer, Given_StorageFolder and Given_BrowserPointerInputSource pass 89/89, with no MonoSupport or AsyncInteropHelper errors in the console.
  • Docs: markdownlint with build/.markdownlint.json and cspell are clean on the migration guide.

PR Checklist ✅

Removes WebAssemblyRuntime.InvokeAsync and InvokeJSUnmarshalled, which no longer worked at runtime. Migrate to [JSImport]/[JSExport]; the 7.0 migration guide shows the replacement.

🤖 Generated with Claude Code

@github-actions github-actions Bot added platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation labels Nov 2, 2026
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 242963 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2492

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png
    • AppBarButtonTest.png
    • ApplicationViewMode.png-dark
    • AppWindowClosing.png
    • AppWindowTitleBar Properties.png-dark
    • Arrange_Performance01.png-dark
    • Attributed_text_Supserscript.png
    • AutoBorderStretchwithleftmargin.png
    • AutomationProperties_Landmark.png-dark
    • AutomationProperties_Landmark.png
    • AutoSuggestBox_Icons.png-dark
    • AutoSuggestBox_Icons.png
    • BasicAutoSuggestBox.png-dark
    • BasicAutoSuggestBox.png
    • Battery.png-dark
    • Battery.png
    • BindableDrawerLayout_ChangePane.png-dark
    • BindableDrawerLayout_ChangePane.png
    • BorderCenteredwithmargins.png-dark
    • BorderCenteredwithmargins.png
  • skia-windows-screenshots: 2458 changed over 2492

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png
    • AppBarToggleButtonTest.png
    • ApplicationViewMode.png
    • AppWindowFeatures.png-dark
    • AppWindowTitleBar Properties.png-dark
    • ArcSegment.png
    • AuthenticationBroker_Cancel.png
    • AutoBorderStretchwithtopmargin.png
    • AutomationProperties_Name.png-dark
    • AutomationProperties_Name.png
    • AutoSuggestBox_BitmapIcon.png
    • AutoSuggestBox_Description.png-dark
    • BadgeNotificationTests.png-dark
    • BadgeNotificationTests.png
    • BasicThemeResources.png-dark
    • BasicThemeResources.png
    • BitmapIcon_Generic.png-dark
    • BitmapIcon_Generic.png
    • BorderCenteredwithmargins.png-dark
    • BorderCenteredwithmargins.png

@ramezgerges

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 243332 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2492

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png
    • AnimatedIconPage.png
    • AppBarButtonWithIconTest.png
    • ApplicationViewMode.png
    • Application_DispatcherShutdownMode.png
    • AppWindowPresenters.png-dark
    • ArcSegment.png-dark
    • Attributed_text_Supserscript.png-dark
    • AutoBorderStretchwithbottommargin.png-dark
    • AutoBorderStretchwithbottommargin.png
    • AutomationProperties_Relations.png-dark
    • AutomationProperties_Relations.png
    • AutoSuggestBox_Description.png-dark
    • AutoSuggestBox_Description.png
    • BadgeNotificationTests.png-dark
    • BadgeNotificationTests.png
    • BasicAutoSuggestBox.png-dark
    • BasicAutoSuggestBox.png
    • BasicThemeResources.png-dark
    • BasicThemeResources.png
  • skia-windows-screenshots: 2458 changed over 2492

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • ApplicationViewMode.png
    • AppWindowClosing.png
    • AppWindowTitleBar Properties.png
    • Attributed_text_Simple.png
    • AuthenticationBroker_Demo.png-dark
    • AutoBorderStretchwithtopmargin.png
    • AutomationProperties_Relations.png
    • AutoSuggestBoxChosenSuggestion.png-dark
    • AutoSuggestBoxChosenSuggestion.png
    • BackGesture.png-dark
    • BackGesture.png
    • Basics Pivot Test.png-dark
    • Basics Pivot Test.png
    • Battery.png-dark
    • Battery.png
    • BindableDrawerLayout_ChangePane.png-dark
    • BindableDrawerLayout_ChangePane.png
    • BorderBottomwithmargins.png-dark
    • BorderBottomwithmargins.png

@MartinZikmund MartinZikmund added the 7.0 PRs only. For issues, use the Release field. label Nov 4, 2026
@MartinZikmund

Copy link
Copy Markdown
Member

@Mergifyio backport release/stable/7.0

@mergify

mergify Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

backport release/stable/7.0

✅ Backports have been created

Details

@ramezgerges
ramezgerges force-pushed the dev/rara/remove-dead-wasm-interop branch from 328d759 to ba68bdb Compare November 4, 2026 18:20
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 243691 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DisplayInformation.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • ImageBrushAlignmentXY.png-dark
    • ImageBrushAlignmentXY.png
    • DynamicFont.png-dark
    • DynamicFont.png
  • skia-windows-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png
    • AnimatedVisualsTestbedPage.png-dark
    • AppBarButtonWithIconTest.png
    • ApplicationViewSizing.png-dark
    • AppWindowClosing.png
    • AppWindowPresenters.png-dark
    • ArcSegment.png
    • Attributed_text_Supserscript.png
    • AutoBorderStretchwithrightmargin.png-dark
    • AutoBorderStretchwithrightmargin.png
    • AutomationProperties_Relations.png
    • AutomationProperties_StructureAndProps.png-dark
    • AutoSuggestBox_Reason.png-dark
    • AutoSuggestBox_Reason.png
    • BasicAutoSuggestBox.png-dark
    • BasicAutoSuggestBox.png
    • BasicThemeResources.png-dark
    • BasicThemeResources.png
    • BitmapIcon_Foreground.png-dark
    • BitmapIcon_Foreground.png

@ramezgerges
ramezgerges force-pushed the dev/rara/remove-dead-wasm-interop branch from ba68bdb to de5e48a Compare November 5, 2026 17:54
@nventive-devops

Copy link
Copy Markdown
Contributor

The build 244081 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png
    • AppBarButtonWithIconTest.png
    • Accessibility_ScreenReader.png-dark
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AppBar_KeyBoard.png
    • AnimatedVisualsTestbedPage.png-dark
    • AppBarButtonWithIconTest.png-dark
    • ApplicationViewSpanningRectsPage.png
    • ApplicationViewMode.png
    • AppBarToggleButtonTest.png
    • AppWindowPresenters.png
    • AppWindowClosing.png
    • AppWindowClosing.png-dark
    • Arrange_Performance01.png
    • AppWindowTitleBar Properties.png-dark
    • AppWindowPositionAndSize.png-dark
    • AuthenticationBroker_Cancel.png-dark
    • AppXamlDefinedResources.png
    • ArcSegment.png-dark
    • AutoBorderStretchwithrightmargin.png-dark
  • skia-windows-screenshots: 2458 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png-dark
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AnimatedVisualsTestbedPage.png-dark
    • AppBarButtonWithIconTest.png
    • ApplicationViewSizing.png-dark
    • Application_DispatcherShutdownMode.png
    • AppWindowPositionAndSize.png-dark
    • AppXamlDefinedResources.png
    • Attributed_text_FontSize_Changing.png
    • Attributed_text_Simple.png-dark
    • AutoBorderStretchwithleftmargin.png-dark
    • AutoBorderStretchwithleftmargin.png
    • AutomationProperties_Landmark.png-dark
    • AutomationProperties_Landmark.png
    • AutoSuggestBoxChosenSuggestion.png-dark
    • AutoSuggestBoxChosenSuggestion.png
    • AutoSuggestBox_Description.png-dark
    • AutoSuggestBox_Description.png
    • BasicAcrylicBrushTest.png-dark
    • BasicAcrylicBrushTest.png

@ramezgerges
ramezgerges force-pushed the dev/rara/remove-dead-wasm-interop branch from de5e48a to 838d9b1 Compare November 6, 2026 16:37
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 244381 found UI Test snapshots differences: skia-linux-screenshots: 2458, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 2458 changed over 2496

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • AnimatedIconPage.png
    • AppBarToggleButtonTest.png
    • Application_DispatcherShutdownMode.png-dark
    • AppWindowPresenters.png-dark
    • AppXamlDefinedResources.png
    • Attributed_text_Supserscript.png-dark
    • AutoBorderStretchwithbottommargin.png
    • AutoBorderStretchwithtopmargin.png
    • AutomationPropertiesExtensions_Role.png-dark
    • AutoSuggestBox_Description.png-dark
    • AutoSuggestBox_Description.png
    • BadgeNotificationTests.png-dark
    • BadgeNotificationTests.png
    • Basics.png-dark
    • Basics.png
    • BezierSegment.png-dark
    • BezierSegment.png
    • BitmapIcon_Monochromatic.png-dark
    • BitmapIcon_Monochromatic.png
  • skia-windows-screenshots: 2458 changed over 2496

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • AppBarButtonWithIconTest.png-dark
    • ApplicationViewMode.png
    • AppWindowFeatures.png-dark
    • AppWindowPresenters.png
    • ArcSegment.png-dark
    • Attributed_text_Simple.png
    • AuthenticationBroker_Demo.png
    • AutoBorderStretchwithtopmargin.png-dark
    • AutoBorderStretchwithtopmargin.png
    • AutoSizedPathCentered.png-dark
    • AutoSizedPathCentered.png
    • AutoSuggestBox_Icons.png-dark
    • AutoSuggestBox_Icons.png
    • BasicAutoSuggestBox.png-dark
    • BasicAutoSuggestBox.png
    • BasicThemeResources.png-dark
    • BasicThemeResources.png
    • BitmapIcon_Foreground.png-dark
    • BitmapIcon_Foreground.png

@unodevops

Copy link
Copy Markdown
Contributor

@ramezgerges
ramezgerges force-pushed the dev/rara/remove-dead-wasm-interop branch from 838d9b1 to 13eb00b Compare November 9, 2026 19:47
WebAssemblyRuntime.InvokeAsync and InvokeJSUnmarshalled called JavaScript that only the WebAssembly DOM heads loaded, so they failed in every Skia app (fixes unoplatform#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]>
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 244909 found UI Test snapshots differences: skia-linux-screenshots: 232, skia-windows-screenshots: 385

Details
  • skia-linux-screenshots: 232 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AutomationProperties_AutomationId.png-dark
    • AutomationProperties_AutomationId.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • Buttons.png-dark
    • Buttons.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • AppWindowTitleBar Properties.png-dark
    • BasicAcrylicBrushTest.png-dark
    • BasicAcrylicBrushTest.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • AnimatedVisualsTestbedPage.png
    • AppWindowTitleBar Properties.png
    • AutomationProperties_StructureAndProps.png-dark
  • skia-windows-screenshots: 385 changed over 2494

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Buttons.png
    • AutomationProperties_AutomationId.png-dark
    • AutomationProperties_AutomationId.png
    • Basics.png-dark
    • Basics.png
    • BenchmarkDotNet.png-dark
    • BenchmarkDotNet.png
    • Border_CornerRadius_Binding.png-dark
    • Border_CornerRadius_Binding.png
    • Border_CornerRadius_BorderThickness.png-dark
    • Border_CornerRadius_BorderThickness.png
    • BreadcrumbBarPage.png-dark
    • BreadcrumbBarPage.png
    • CompositionPath.png-dark
    • CompositionPath.png
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AnimatedVisualsTestbedPage.png-dark
    • AnimatedVisualsTestbedPage.png
    • BasicAcrylicBrushTest2.png-dark

@mergify

mergify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@ramezgerges
ramezgerges merged commit 5c8a6bb into unoplatform:master Nov 10, 2026
55 checks passed
opensource-fork-sync Bot pushed a commit to cla7aye15I4nd/opensource-unoplatform__uno that referenced this pull request Nov 11, 2026
Uno 7.0.32 was listed on nuget.org on 2026-11-10 (17:07 UTC), so
generatepkgdiff now resolves 7.0.32 as the published stable baseline
for every package that has a 7.0 stable. CompareVersion matches an
IgnoreSet only on an exact Major.Minor, and the file had no 7.0 set,
so the WASM interop removals from unoplatform#25944 (listed in the 6.6 and 6.7
sets) stopped applying and Generate NuGet Packages failed on master
and on every PR.

Adds a 7.0 set with only the breaking changes merged after the 7.0
release: the 6 Uno.Foundation.WebAssemblyRuntime removals of unoplatform#25944.
Same fix as 435ca86 for 6.7.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

7.0 PRs only. For issues, use the Release field. area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[WebAssembly] WebAssemblyRuntime.InvokeAsync and InvokeJSUnmarshalled depend on JavaScript that is no longer shipped

6 participants