Skip to content

Native CI cleanup - #23492

Merged
MartinZikmund merged 24 commits into
feature/breakingchangesfrom
dev/mazi/nativecidrop2
Jun 19, 2026
Merged

MartinZikmund merged 24 commits into
feature/breakingchangesfrom
dev/mazi/nativecidrop2

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Jun 18, 2026 •

Copy link
Copy Markdown
Member

GitHub Issue: closes unoplatform/uno-private#2058, closes unoplatform/uno-private#2103

PR Type:

🏗️ Build or CI related changes

What changed? 🚀

Follow-up to #23484, completing the SDK / packaging side of the Uno Platform 7.0 Skia-only native-drop. Skia is the only renderer, so the renderer feature, the dead renderer-selection branches, and the last native-only package are removed.

  • Remove the NativeRenderer UnoFeature (uno-private#2102) — dropped from the UnoFeature enum and Sdk.props.buildschema.json. The nativerenderer string is already stripped during evaluation, so consumers see no behaviour change. SkiaRenderer is kept as an implied no-op for back-compat.
  • Collapse dead native-renderer SDK branches (uno-private#2062) — removed the inert !skiarenderer package injections (Uno.UniversalImageLoader, native Uno.WinUI.MediaPlayer.WebAssembly, the no-op SkiaSharp.Views removal). The positive skiarenderer gates are intentionally kept — they now mean "inject the Skia packages" for every head. Added a removal banner to the native-renderer docs.
  • Stop producing Uno.WinUI.WebAssembly (uno-private#2058, Bump NuGet.VisualStudio from 4.5.0 to 4.6.4 #2103) — the legacy WASM-DOM head is superseded by the Skia browser head (Uno.WinUI.Runtime.Skia.WebAssembly.Browser). Removed from the Uno.Sdk packages.json manifest + its dead injection, deleted the nuspec and its pack-pipeline wiring, and retired the classic WASM-DOM template heads (UnoAppWinUI.Wasm, UnoAppWinUILinuxValidation.Wasm) that still consumed it. Added a ValidateNoNativeUIHeadPackages pack guard that fails the build if a native UI head package is ever produced again.
  • Migration guide — added doc/articles/migrating-to-uno-7.md.

Intentionally NOT changed — the supported Skia heads still depend on these, so they stay:

  • Native Hot Reload wiring in Uno.WinUI.DevServer.targets — gated on the platform identifier, it serves Skia-on-Android/iOS/WASM Hot Reload.
  • Uno.WinUI.Runtime.Skia.X11 / .MacOS — live Skia desktop runtime heads (not bootstrapper meta-packages).

Deferred to a separate branch:

  • uno-private#2059 (strip native TFMs / remove the native Uno.UI-and-higher project heads) — the pure-native heads reference the kept native Uno.Foundation/Uno.UWP heads and share the Net*Mobile TFM properties with the kept Skia-mobile heads, so they can't be stripped in isolation. This lands with the native source/project deletion it gates.
  • uno-private#2060 / Bump Microsoft.VisualStudio.SDK.EmbedInteropTypes from 15.0.16 to 15.0.27 #2061 — their literal removals (binaries_build_native_macos, SingleProject.*.targets, Android* features) target Skia-supporting infrastructure and need issue-text corrections, not code.

Breaking changes

  • The Uno.Sdk NativeRenderer UnoFeature is removed. Apps listing it should drop it; Skia is always used.
  • The Uno.WinUI.WebAssembly package is no longer produced. WebAssembly apps use the Skia browser head (referenced implicitly by the Uno.Sdk). See Migrating to Uno Platform 7.0.

PR Checklist ✅

DerekRaven and others added 13 commits June 15, 2026 18:15
A strong ALC reference in XamlParseContext pinned collectible secondary-app
ALCs forever: parse contexts are retained long-term by ResourceBinding and
ThemeResourceReference on elements reachable from non-collectible statics,
and the lazy by-AssemblyName resolution could cache a collectible ALC inside
a never-dying generated __ParseContext_ singleton. gcroot showed this field
as the pinning edge in every chain to a leaked secondary Application
(~+48 MB / +420K objects leaked per reload).

- Store non-default ALCs via WeakReference<AssemblyLoadContext>
- Keep a strong fast-path field for the process-immortal default ALC
- Re-run lazy by-name resolution when a previously resolved target was
  collected, so a reloaded same-name assembly resolves to the NEW ALC
  (consistent with ResourceResolver's bump-to-live-registration behavior)
- Post-unload lookups return null and fall back to host resolution per
  ResourceResolver's documented priority order

Red/green: Given_XamlParseContext.When_Collectible_Alc_Unloaded_Then_Context_Does_Not_Pin_It

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…-found cache

Typed resource lookups that miss (e.g. implicit-style probes for
secondary-app element types hosted in the host visual tree) were cached in
_keyNotFoundCache as ResourceKeys strongly holding the RuntimeType.
Element-level dictionaries live for the host's lifetime and are never touched
by CleanupNonDefaultAlcCaches, so a single cached collectible RuntimeType
pinned LoaderAllocator -> ALC -> the entire previous secondary-app graph.
gcroot reported 10,378 root paths through one such cache entry on a host
page's Resources.

Skip the not-found cache for keys whose Type.IsCollectible is true
(CanCacheKeyNotFound); re-probing such keys is cheap compared to leaking a
whole secondary app. Non-collectible keys keep the existing caching behavior.

Red/green: Given_ResourceDictionary_NotFoundCache (collectible type emitted
via AssemblyBuilderAccess.RunAndCollect must be collectable after a miss;
non-collectible keys still miss consistently)

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Documents the problem (one full secondary-app graph leaked per reload, ALC
never collected after Unload), the three gcroot-confirmed root causes in
Uno.UI (XamlParseContext strong ALC capture, AlcContentHost projected-resource
retention, ResourceDictionary not-found cache pinning collectible Types), the
fixes, and the red/green + end-to-end validation (secondary Application count
flat at 1 across 4 reload cycles vs +1 per reload before).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
A DependencyObject stored as a value in a ResourceDictionary is now flagged
(IsResourceDictionaryItem) so it does not inherit or cache the DataContext of
the subtree it is applied into. This matches WinUI, where resources have no
DataContext.

Why it matters for collectible ALCs: a shared resource (e.g. a brush in a
GlobalStaticResources singleton) is rooted by a long-lived dictionary, yet it
is pulled into many short-lived subtrees via {StaticResource}/{ThemeResource}.
If it cached the inherited DataContext of one such subtree, it would keep that
DataContext — and everything it transitively references — alive forever. When
the subtree lives in a collectible AssemblyLoadContext, that retention pins the
whole context and prevents it from unloading. Only DataContext is blocked;
other inherited properties (FlowDirection, theme, …) still propagate.

Adds Given_ResourceDictionary_DataContext regression tests (flagging on store,
DataContext block, and a non-resource child still inheriting).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- ResourceDictionary: extract TryCacheKeyNotFound() so the collectible-key guard is applied
  once instead of repeated at each key-not-found site (jeromelaban). Folding CanCacheKeyNotFound
  directly into useKeysNotFoundCache was avoided because that variable also gates the
  `modifiedKey { ShouldFilter = false }` transform used by the value lookup, so a helper keeps
  lookup behaviour identical.
- DependencyObjectStore: back IsResourceDictionaryItem with a single-byte [Flags] StoreFlags
  bitfield instead of a standalone bool field, so future per-store flags don't grow the
  per-instance footprint (jeromelaban).
- Add When_Element_Binding_Uses_Inherited_DataContext_Then_It_Still_Resolves to guard that the
  DataContext block (scoped to ResourceDictionary items) does not break binding propagation in
  styles/resources (jeromelaban).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Addresses review on #23413: the spec documented an
AlcContentHost fix and a runtime test that are not part of this PR.

- Remove AlcContentHost as an implemented fix; move it to a follow-up note
  as a related, separately-tracked collectible-ALC pin
- Drop the Given_AlcContentHost runtime-test bullet from Validation
- Document the resource-DataContext fix (DependencyObjectStore
  IsResourceDictionaryItem + ResourceDictionary) that this PR actually
  contains, with its Given_ResourceDictionary_DataContext coverage
- Note the end-to-end measurement reflects the full fix workstream

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The hot-reload client logged every frame whose Name it does not handle at
Error. A frame can legitimately arrive on a scope this client participates
in while being addressed to a different consumer (e.g. host-only diagnostics
frames relayed over a shared scope). Those are benign and expected, so
surfacing them as red console errors is misleading. Log them at Debug.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The reuse-on-reload warning claimed all state is immutable across hot-reload, but
the AssemblyLoadContext is now held weakly and can lapse. Note it as the explicit
exception — the reference only dies on ALC unload (teardown), not hot-reload — so
contributors aren't misled about what may change across reloads.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Per review request: add runtime tests (real visual tree, XAML-parsed) confirming
the ResourceDictionary DataContext block does not regress style-based binding
DataContext propagation. A resource Style carries no DataContext, but the element
it is applied to still inherits DataContext and its {Binding} resolves; an ordinary
child still inherits while a sibling resource does not.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The collectible-ALC and collectible-type reclamation loops did only Collect +
WaitForPendingFinalizers. Reclaiming a collectible AssemblyLoadContext /
LoaderAllocator reliably needs a second Collect after finalizers run, since
finalization can release the last references keeping it alive — without it the
assertions can intermittently fail on CI. Add the trailing Collect to both loops.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Native UI rendering is removed in 7.0 and Skia is the only renderer, so
the NativeRenderer feature can never be selected. Drop it from the
UnoFeature enum and the Uno.Sdk build schema. The 'nativerenderer'
string is already stripped during evaluation (Uno.Features.targets), so
no consumer behaviour changes.

SkiaRenderer is intentionally kept as a now-implicit no-op for
back-compat. Native Hot Reload wiring in Uno.WinUI.DevServer.targets is
also kept on purpose: it serves the supported Skia-on-Android/iOS/WASM
heads (gated on the platform identifier, not the renderer).

Internal tracking: NativeRenderer feature removal (2102).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EUHMnPgHS11w9vBmrsP2XE
@github-actions github-actions Bot added the area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk label Jun 18, 2026
@github-actions

github-actions Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 4s —— View job


Review: Native CI cleanup

  • Gather context and read changed files
  • Review src/Uno.Sdk/UnoFeature.cs
  • Review src/Uno.Sdk/Sdk/Sdk.props.buildschema.json
  • Post inline findings
  • Post summary

Overall Verdict: ✅ LGTM

0 blocking issues. 1 informational note. 2 administrative items.


Code Review

The two changes are clean, complete, and correct:

  • UnoFeature.cs — Removes the NativeRenderer enum member and its [UnoArea(UnoArea.Core)] attribute. SkiaRenderer is intentionally retained as a back-compat no-op (per the commit message, Uno.Features.targets always implies it).
  • Sdk.props.buildschema.json — Removes the NativeRenderer entry from the build schema's enum values, keeping IDE tooling consistent with the enum.

A search confirms no other NativeRenderer references remain in .cs, .targets, .props, or .json files under src/. The back-compat strip in Uno.Features.targets ($(UnoFeatures.Replace(';nativerenderer;', ';'))) predates this PR and ensures any consumer project that still lists NativeRenderer in UnoFeatures keeps building without error.


Informational Note

src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.Wasm.targets (lines 21–23, not in this diff) contains a condition that checks $(UnoFeatures.Contains(';nativerenderer;')). Because Uno.Features.targets always strips nativerenderer before this check runs, the clause is now permanently false — effectively dead. This predates the PR and can be addressed in a follow-up cleanup if desired.


Administrative Items

  1. PR template incomplete — The GitHub Issue field, PR type, "What changed" section, and the checklist are all blank. Please fill these out before merge, particularly the issue link.

  2. PR title vs. Conventional Commits — The PR title Native CI cleanup has no type prefix. The commit on the branch (feat!: Remove dead NativeRenderer UnoFeature) correctly follows Conventional Commits and is more descriptive. Consider updating the PR title to match the commit or use a feat!: / chore: prefix per the repo guidelines.


Validation: Code-review assessment only (no local build executed on this two-file deletion).

MartinZikmund and others added 2 commits June 18, 2026 12:38
Skia is always the renderer in 7.0 (Uno.Features.targets implies
';skiarenderer;' and strips ';nativerenderer;'), so the inverse
'!skiarenderer' package branches are dead and never inject. Remove the
native-only injections they gated:
- Uno.UniversalImageLoader (native Android image loader)
- Uno.WinUI.MediaPlayer.WebAssembly (native WASM-DOM media player)
- the no-op SkiaSharp.Views removal on non-Skia WASM

No behaviour change: every head already evaluates these to Skia. The
positive ';skiarenderer;' gates are kept as they now mean "inject the
Skia packages" for every head. Document SkiaRenderer as an implied
no-op, and add a removal banner to the native-renderer docs.

Internal tracking: SkiaRenderer no-op / renderer-branch cleanup (2062).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EUHMnPgHS11w9vBmrsP2XE
The legacy WASM-DOM head (Uno.WinUI.WebAssembly) is superseded by the
Skia browser head (Uno.WinUI.Runtime.Skia.WebAssembly.Browser). With
Skia always the renderer, the SDK's implicit injection for it is dead
(the 'nativerenderer OR !skiarenderer' branch can never match). Remove
the package from the Core manifest group and delete the dead injection
block; browser-wasm apps already receive the Skia browser head.

The Uno.WinUI.Runtime.Skia.X11 / .MacOS entries are intentionally kept:
they are live Skia desktop runtime heads, not bootstrapper meta-packages.

Internal tracking: packages.json / implicit-targets pruning (2103).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EUHMnPgHS11w9vBmrsP2XE
@github-actions

github-actions Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 17s —— View job


Review: Native CI cleanup

  • Gather context
  • Read changed files and diff
  • Post inline findings
  • Post summary

Overall Verdict: ✅ LGTM with nit

0 blocking issues. 1 inline nit. 2 administrative items.


Code Review

All seven changed files are clean and consistent:

  • UnoFeature.cs — NativeRenderer member and its [UnoArea(UnoArea.Core)] attribute correctly removed. SkiaRenderer is kept with a clear back-compat comment.
  • Sdk.props.buildschema.json — NativeRenderer IDE schema entry removed, keeping tooling in sync.
  • packages.json — Uno.WinUI.WebAssembly and Uno.WinUI.Runtime.WebAssembly removed; unrelated media player and Skia packages are correctly retained.
  • Uno.Implicit.Packages.ProjectSystem.Android.targets — Uno.UniversalImageLoader conditional (native-renderer-only) correctly dropped.
  • Uno.Implicit.Packages.ProjectSystem.Uno.targets — The Remove override that excluded SkiaSharp on WASM for native-renderer projects is correctly eliminated.
  • Uno.Implicit.Packages.ProjectSystem.Wasm.targets — nativerenderer-gated blocks for Uno.WinUI.WebAssembly / Uno.WinUI.Runtime.WebAssembly (both executable and library variants) cleanly removed.
  • doc/articles/using-native-rendering.md — Deprecation callout ([!IMPORTANT]) correctly added; preserving the page as a historical reference for 6.x users is the right call.

A grep confirms the only remaining nativerenderer reference under src/Uno.Sdk/ is the intended back-compat strip in Uno.Features.targets (UnoFeatures.Replace(';nativerenderer;', ';')), which predates this PR.


Inline Finding

One stale comment flagged on Uno.Implicit.Packages.ProjectSystem.Uno.targets:16 — the condition is functionally correct, but the inline remark says "with native renderer (not needed)" which now references a removed feature. A one-word suggestion is attached.


Administrative Items

  1. PR template is incomplete — GitHub Issue field, PR type, "What changed?" section, and checklist are all blank. Please fill these out (especially the issue reference) before merge.
  2. PR title has no Conventional Commits prefix — Native CI cleanup should be chore: Native CI cleanup (or feat!: / refactor: to match the commit style). The commits themselves are correctly formatted.

Document the 7.0 move to Skia-only rendering: native renderer removal,
the NativeRenderer feature removal with SkiaRenderer now implied, the
retirement of the native-only Uno.WinUI.WebAssembly head (superseded by
the Skia browser head Uno.WinUI.Runtime.Skia.WebAssembly.Browser), and
native Android image-loader removal. Wire it into the upgrade TOC.

Internal tracking: native-package-removal migration guide (2058, partial).
The nuspec deletion and the produced-package CI guard land with the
native-head/template cascade.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EUHMnPgHS11w9vBmrsP2XE
@unodevops

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot added the area/build Categorizes an issue or PR as relevant to build infrastructure label Jun 18, 2026
@github-actions

github-actions Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 55s —— View job


Review: Native CI cleanup

  • Gather context
  • Read changed files and diff
  • Check doc changes
  • Check SDK/build changes
  • Post inline findings
  • Post summary

Overall Verdict: ✅ LGTM with nit

0 blocking issues. 1 inline nit. 2 administrative items.


Code Review

All nine changed files are clean and consistent:

  • UnoFeature.cs — NativeRenderer member correctly removed; SkiaRenderer kept with a clear back-compat comment. The comment ("Skia is always the renderer in 7.0; this feature is implied and kept only for back-compat") is appropriately concise and explains the non-obvious why.
  • Sdk.props.buildschema.json — NativeRenderer IDE schema entry removed, keeping tooling in sync with the enum.
  • packages.json — Uno.WinUI.WebAssembly removed from the version manifest; unrelated media player and Skia packages correctly retained.
  • Uno.Implicit.Packages.ProjectSystem.Android.targets — Uno.UniversalImageLoader conditional (native-renderer-only) correctly dropped; no other native-renderer guards remain in this file.
  • Uno.Implicit.Packages.ProjectSystem.Uno.targets — The Remove override that excluded SkiaSharp on WASM for native-renderer projects correctly eliminated. One stale comment remains (flagged inline).
  • Uno.Implicit.Packages.ProjectSystem.Wasm.targets — nativerenderer-gated blocks for Uno.WinUI.WebAssembly (both executable and library variants) and the native-renderer-only Uno.WinUI.MediaPlayer.WebAssembly condition cleanly removed. The Uno.WinUI.Runtime.Skia.WebAssembly.Browser injection at lines 16–21 is still gated on skiarenderer in UnoFeatures, which is correct because Uno.Features.targets always injects skiarenderer before this runs (line 13 of Uno.Features.targets).
  • doc/articles/features/using-native-rendering.md — Deprecation [!IMPORTANT] callout correctly added; preserving the page as a 6.x historical reference is the right call.
  • doc/articles/migrating-to-uno-7.md — New migration guide is accurate, covers all three removal areas (feature flag, WASM package, Android image loader), and correctly notes UNOB0017 as the diagnostic for stale explicit references.
  • doc/articles/toc.yml — Uno 7.0 entry correctly placed above Uno 6.0 in the migration section.

A grep confirms the only remaining nativerenderer references under src/Uno.Sdk/targets/ are the intentional back-compat strip in Uno.Features.targets — no dead gates remain.


Inline Finding

One stale comment flagged on Uno.Implicit.Packages.ProjectSystem.Uno.targets:16 — the condition is correct but the trailing remark references the removed NativeRenderer feature. A one-line suggestion is attached.


Administrative Items

  1. PR template incomplete — The GitHub Issue field, PR type, "What changed?" section, and checklist are all blank. Please fill these out (especially the issue reference) before merge.
  2. PR title has no Conventional Commits prefix — Native CI cleanup should carry a type such as chore: or refactor: per the repo guidelines. The individual commits are correctly formatted.

The legacy WASM-DOM head is removed in 7.0; browser apps use the Skia
browser head (Uno.WinUI.Runtime.Skia.WebAssembly.Browser). Delete its
nuspec and de-wire it from the pack pipeline (_NuspecFiles, the pack
step, and the package diff), and retire the classic WASM-DOM template
heads that still consumed it (UnoAppWinUI.Wasm,
UnoAppWinUILinuxValidation.Wasm) with their solution and template-test
wiring.

Add a pack guard (ValidateNoNativeUIHeadPackages) that fails the build
if a native UI rendering head package (Uno.WinUI.WebAssembly,
Uno.WinUI.Runtime.WebAssembly) is ever produced again.

Internal tracking: stop producing native UI packages (2058).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EUHMnPgHS11w9vBmrsP2XE
@unodevops

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot added the area/solution-templates Categorizes an issue or PR as relevant to the solution template label Jun 18, 2026
@github-actions

github-actions Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 47s —— View job


Review: Native CI cleanup

  • Gather context
  • Read changed files and diff
  • Post inline findings
  • Post summary

Overall Verdict: ✅ LGTM with nit

0 blocking issues. 1 inline nit (stale comment, same as prior reviews). 2 administrative items.


Code Review

All 32 changed files are clean and correctly implement the native-renderer removal:

  • UnoFeature.cs — NativeRenderer enum member and its [UnoArea] attribute correctly removed. SkiaRenderer is kept with an accurate back-compat comment.
  • Sdk.props.buildschema.json — IDE schema entry for NativeRenderer removed, tooling stays in sync.
  • packages.json — Uno.WinUI.WebAssembly removed from the version manifest; unrelated Skia and media-player packages retained.
  • Uno.Implicit.Packages.ProjectSystem.Android.targets — Uno.UniversalImageLoader conditional (native-renderer-only) correctly dropped.
  • Uno.Implicit.Packages.ProjectSystem.Uno.targets — The Remove override that excluded SkiaSharp on WASM for native-renderer projects is correctly eliminated. One stale comment remains (flagged inline — same as prior reviews).
  • Uno.Implicit.Packages.ProjectSystem.Wasm.targets — All nativerenderer-gated blocks cleanly removed. The remaining skiarenderer conditions are correct: Uno.Features.targets always injects skiarenderer, so these are effectively always true, which is the intended behavior.
  • build/Uno.UI.Build.csproj — Uno.WinUI.WebAssembly removed from the pack and API-diff pipelines. The new ValidateNoNativeUIHeadPackages guard target is a good belt-and-suspenders check — the Exists() path resolution is consistent with how other checks in the same file work.
  • build/nuget/Uno.WinUI.WebAssembly.nuspec — Correctly deleted.
  • Solution templates — Both UnoAppWinUI and UnoAppWinUILinuxValidation Wasm heads and all their associated files correctly removed from solutions and solution filters.
  • doc/articles/features/using-native-rendering.md — Deprecation [!IMPORTANT] callout correctly added; preserving the page as a 6.x historical reference is the right call.
  • doc/articles/migrating-to-uno-7.md — New migration guide is accurate, covers all three removal areas (feature flag, WASM package, Android image loader), and correctly notes UNOB0017 as the diagnostic for stale explicit references. The xref:Uno.Development.MigratingToUno6 cross-reference resolves correctly.
  • doc/articles/toc.yml — Uno 7.0 entry correctly placed above Uno 6.0.

The only remaining nativerenderer references under src/Uno.Sdk/ are the intentional back-compat strip in Uno.Features.targets — no dead gates remain.


Administrative Items

  1. PR template incomplete — GitHub Issue field, PR type, "What changed?" section, and checklist are all blank. Please fill these out (especially the issue reference) before merge.
  2. PR title has no Conventional Commits prefix — Native CI cleanup should carry a type prefix such as chore: or feat!: per repo guidelines. The individual commits are correctly formatted.

@unodevops

Copy link
Copy Markdown
Contributor

MartinZikmund and others added 3 commits June 18, 2026 14:34
…nning

fix(alc): stop shared framework caches/resources from pinning collectible AssemblyLoadContexts
…n-frame-log-level

fix(hot-reload): log unrecognized client frame at Debug not Error
fix(macos): Don't override dock icon for bundled apps
ajpinedam and others added 4 commits June 18, 2026 14:47
…ctionary-scope

fix: Resolve duplicate materializedProvider local in ResourceDictionary
…v/mazi/nativecidrop2

# Conflicts:
#	src/SolutionTemplate/UnoAppWinUI/UnoAppWinUI.Wasm/UnoAppWinUI.Wasm.csproj
#	src/SolutionTemplate/UnoAppWinUILinuxValidation/UnoAppWinUILinuxValidation.Wasm/UnoAppWinUILinuxValidation.Wasm.csproj
@github-actions

github-actions Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 5m 13s —— View job


Review: Native CI cleanup

  • Gather context
  • Read the full diff
  • Review SDK/build changes
  • Review C# source changes (ResourceDictionary, DependencyObjectStore, XamlParseContext)
  • Review test additions
  • Post inline findings
  • Post summary

Overall Verdict: ✅ LGTM with nit

0 blocking issues. 1 inline nit (stale comment, same carry-forward from 3 prior reviews). 1 PR-description gap.


SDK / Packaging changes

All clean:

  • UnoFeature.cs — NativeRenderer removed, SkiaRenderer kept with a clear back-compat comment. Correct.
  • Sdk.props.buildschema.json — IDE schema entry removed, tooling in sync. Correct.
  • packages.json — Uno.WinUI.WebAssembly removed. Correct.
  • Uno.Implicit.Packages.ProjectSystem.Android.targets — Uno.UniversalImageLoader native-renderer conditional dropped. Correct.
  • Uno.Implicit.Packages.ProjectSystem.Uno.targets — Dead Remove override for SkiaSharp on WASM correctly removed. One stale comment remains on line 16 (flagged inline).
  • Uno.Implicit.Packages.ProjectSystem.Wasm.targets — All nativerenderer-gated blocks cleanly removed. The retained skiarenderer conditions are correct: Uno.Features.targets always injects skiarenderer, so they're effectively always-true, which is the intent.
  • build/Uno.UI.Build.csproj — Uno.WinUI.WebAssembly removed from pack and API-diff pipelines. The new ValidateNoNativeUIHeadPackages guard is correct — Exists() checks relative to the build/ directory, which is where nuget pack (without -OutputDirectory) writes output.
  • build/nuget/Uno.WinUI.WebAssembly.nuspec — Correctly deleted.
  • Solution templates — Both UnoAppWinUI.Wasm and UnoAppWinUILinuxValidation.Wasm heads and all associated files correctly removed from solutions and solution filters.
  • doc/articles/features/using-native-rendering.md — Deprecation [!IMPORTANT] callout added; preserving the page as a 6.x historical reference is the right call.
  • doc/articles/migrating-to-uno-7.md — New migration guide covers all three removal areas and correctly references UNOB0017.

ALC memory-leak fixes (spec 044)

This PR also includes three correctness / ALC-leak fixes that are not mentioned in the PR description. All three are well-implemented:

XamlParseContext.cs — The ALC is now held via WeakReference<AssemblyLoadContext> with a direct strong field only for AssemblyLoadContext.Default (process-immortal). The _assemblyLoadContextResolved = true sentinel is set correctly before the scan loop, so a miss latches and avoids repeated AppDomain.GetAssemblies() scans. The re-resolution on dead-ref handles hot-reload correctly. SetAssemblyLoadContext cleanly separates the three cases (null / Default / non-default). Getter contract is preserved.

ResourceDictionary.cs — CanCacheKeyNotFound gates on Type.IsCollectible and is applied identically via TryCacheKeyNotFound at both not-found sites, eliminating the duplicate inline blocks. IsResourceDictionaryItem = true is correctly set at both the direct-indexer path and the TryMaterializeLazy materialization path, covering all ways a DependencyObject can enter the dictionary.

DependencyObjectStore.cs — IsResourceDictionaryItem is backed by a [Flags] StoreFlags : byte bitfield — a deliberate allocation-minimizing design choice (one byte per store rather than a separate bool field). The guard in OnParentPropertyChangedCallback uses parentProperty.UniqueId == _parentDataContextProperty.UniqueId — _parentDataContextProperty is initialized at field declaration (= UIElement.DataContextProperty) and updated to a parent-overridden value at line 1454, so the comparison is always valid. Only DataContext is blocked; all other inherited properties propagate normally.

Tests — The three new test classes (Given_XamlParseContext, Given_ResourceDictionary_NotFoundCache, Given_ResourceDictionary_DataContext) are thorough: they cover live-ALC, dead-ALC, Default-ALC, collectible vs. non-collectible key, flag setting, DataContext non-propagation on resources, and DataContext normal-propagation on non-resource children. The collectible-type tests use [MethodImpl(MethodImplOptions.NoInlining)] to prevent the JIT from extending local ALC/type references into the GC collection loop — a necessary technique for reliable GC tests. Runtime counterparts for the DataContext cases are included.


PR description gap

The PR description describes only the SDK/packaging cleanup. The ALC memory-leak fixes (XamlParseContext, ResourceDictionary, DependencyObjectStore, +5 new test files, specs/044-alc-memory-leak-fixes/spec.md) are entirely unmentioned. These are substantive correctness changes — consider adding a "What changed" section for them so reviewers and changelog consumers know what the PR contains.


Validation: Code-review assessment only (no local build executed). Build and runtime-test evidence provided via spec 044 and test additions.

@CLAassistant

CLAassistant commented Jun 18, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
6 out of 7 committers have signed the CLA.

✅ DerekRaven
✅ nickrandolph
✅ vatsashah45
✅ ajpinedam
✅ MartinZikmund
✅ carldebilly
❌ Nick Randolph


Nick Randolph seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions Bot added platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform area/automation Categorizes an issue or PR as relevant to project automation labels Jun 18, 2026
@github-actions

github-actions Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 5m 46s —— View job


Review: Native CI cleanup

  • Gather context
  • Read diff and changed files
  • Review SDK/build changes
  • Review new source code changes (ResourceDictionary, XamlParseContext, DependencyObjectStore)
  • Review new test files
  • Post inline findings
  • Post summary

Overall Verdict: ✅ LGTM with repeat nit

0 blocking issues. 1 inline nit (same stale comment, 4th pass). 1 administrative item.


New code introduced since prior reviews (ALC memory leak fixes)

The PR now includes three substantive bug fixes for collectible-ALC memory leaks, merging in from the feature/breakingchanges base. All are clean:

XamlParseContext.cs — _assemblyLoadContext changed from a strong field to a WeakReference<AssemblyLoadContext>, with the default ALC fast-pathed to a strong field (it is process-immortal). On dead-reference (ALC unloaded and collected), the getter correctly nulls the weak ref, resets the _assemblyLoadContextResolved latch, and re-scans AppDomain.GetAssemblies() — the re-scan is correct for hot-reload (a re-launched app has a new ALC for the same assembly name). The SetAssemblyLoadContext helper cleanly separates the three cases (null, Default, collectible). Logic is sound.

DependencyObjectStore.cs — IsResourceDictionaryItem flag (a 1-byte StoreFlags bitfield) correctly blocks DataContext inheritance in OnParentPropertyChangedCallback. The guard IsResourceDictionaryItem && parentProperty.UniqueId == _parentDataContextProperty.UniqueId is narrow: only DataContext is blocked; FlowDirection, theme, and all other inherited properties continue to propagate. Other inherited properties reaching resource children (e.g. gradient brushes inside a shape resource) are unaffected. The bitfield approach is a correct footprint trade-off given that DependencyObjectStore is allocated per DependencyObject.

ResourceDictionary.cs — Two insertion sites correctly set IsResourceDictionaryItem = true:

  1. Set() (the explicit/indexer path, covering Add(), this[key] = value)
  2. TryMaterializeLazy() (lazy-initialized resources that bypass Set() on first insertion)

The CanCacheKeyNotFound guard (TypeKey is not { IsCollectible: true }) correctly prevents collectible RuntimeType keys from entering the not-found cache. TryCacheKeyNotFound centralises the guard identically at both not-found sites — a cleaner refactor than the previous inline duplication.

Tests — All four new test files are correct:

  • Given_XamlParseContext.cs — uses [MethodImpl(NoInlining)] correctly to prevent JIT lifetime extension into the GC loop; triple GC collect (collect + wait for finalizers + second collect) is the correct pattern for deterministic collectible-ALC reclaim.
  • Given_ResourceDictionary_NotFoundCache.cs — same NoInlining + triple GC pattern; EmitCollectibleType() via AssemblyBuilderAccess.RunAndCollect is the right tool for a type that must actually be collectible.
  • Given_ResourceDictionary_DataContext.cs (unit test) — correctly accesses IsResourceDictionaryItem via InternalsVisibleTo (Uno.UI/AssemblyInfo.cs already lists Uno.UI.UnitTests).
  • Given_ResourceDictionary_DataContext.cs (runtime test) — UITestHelper.Load(root, x => x.IsLoaded) custom predicate is correct (avoids WaitForLoaded timing out on roots before they settle).

ClientHotReloadProcessor.cs — Log level for unrecognised frames correctly demoted from Error to Debug. Unrecognised frames are expected (host-only diagnostics frames relayed over a shared scope); Error level was misleading.

MacOSWindowNative.cs — Correct guard: setApplicationIconImage: now skipped when bundled, preventing it from clobbering a bundle's own appearance-aware icon. The comment accurately explains the why.


Inline Finding

Stale comment on Uno.Implicit.Packages.ProjectSystem.Uno.targets:16 — `` still references the removed NativeRenderer feature. This is the 4th time it has been flagged; a one-line suggestion is attached.


Administrative Item

PR title — Native CI cleanup still has no Conventional Commits type prefix. The individual commits (feat!:, build!:, docs:, refactor:) are correctly formatted; the PR title should match (e.g. feat!: Native CI cleanup or chore: Native CI cleanup).


Validation: Code-review assessment. Build and runtime validation deferred to CI.

@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund
MartinZikmund enabled auto-merge June 18, 2026 23:04
@nventive-devops

Copy link
Copy Markdown
Contributor

The build 218987 did not find any UI Test snapshots differences.

@MartinZikmund
MartinZikmund merged commit 9f345c3 into feature/breakingchanges Jun 19, 2026
68 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/nativecidrop2 branch June 19, 2026 05:29
MartinZikmund added a commit that referenced this pull request Aug 11, 2026
The Uno.WinUI.MediaPlayer.WebAssembly project was removed with the native WASM-DOM heads (#23492, uno-private#2097); no package is produced, so the implicit reference in packages.json is dangling. The legacy WASM-DOM runtime ids were already gone; Uno.WinUI.Runtime.Skia.X11/.MacOS and the Uno.Wasm.Bootstrap group are still produced and kept.

Related to unoplatform/uno-private#2103

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01YCxZjE2cpi17oKR7SnseRE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation area/build Categorizes an issue or PR as relevant to build infrastructure area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk area/solution-templates Categorizes an issue or PR as relevant to the solution template kind/documentation platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants