Skip to content

Native drop follow-up: sync-gen ref assertion + orphaned template servers - #23534

Merged
MartinZikmund merged 2 commits into
feature/breakingchangesfrom
dev/mazi/nativedrop-followup
Jun 26, 2026
Merged

MartinZikmund merged 2 commits into
feature/breakingchangesfrom
dev/mazi/nativedrop-followup

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

GitHub Issue: Part of unoplatform/uno-private#2049 — 🦋 Drop native targets

Follow-up to #23470 (native drop), addressing two loose ends surfaced during its review. No behavioral change to Uno.UI or any shipping renderer.

PR Type:

🔄 Refactoring · 🏗️ Build or CI related changes

What changed? 🚀

Two small, independent clean-ups left over from the native-targets drop:

1. Sync generator — make the Dispatching reference assertion load-bearing (refactor)

After the native drop, the WinAppSDK sync generator sources native/WASM Microsoft.UI.Dispatching.* symbols transitively through the kept Uno.UWP head (which references Uno.UI.Dispatching). The restore-validation guard in LoadProject, however, only asserted Uno.Foundation for that platform head.

That left a silent failure mode: if the Uno.UWP → Uno.UI.Dispatching reference were ever broken, GetTypeByMetadataName would quietly return null for the Dispatching types and the generator would strip their native #if guards from the generated stubs — exactly the regression that occurred (and was fixed) mid-#23470 — with no error. Adding Uno.UI.Dispatching to the platform-head expectedRefs turns that into a loud restore failure. Both Uno.UWP heads (Uno.netcoremobile, Uno.Wasm) already carry the reference, so the stricter assertion holds today.

2. Templates — delete orphaned WASM bootstrap-server heads (build)

The UnoAppWinUI and UnoAppWinUILinuxValidation solution-validation templates each still carried a *.Server project (a Uno.Wasm.Bootstrap.Server host) whose only purpose was serving the WASM-DOM head removed by the native drop. Their <ProjectReference> pointed at the now-deleted *.Wasm.csproj, breaking restore of those standalone template solutions (the .sln files had already had their .Wasm entries pruned, but the .Server ref-removal was missed). With no browser head left for them to host, the .Server projects are removed entirely and pruned from both .sln files.

These are internal solution-validation templates; the main Uno.UI.slnx build graph never referenced them and is unaffected.

Validation 🧪

PR Checklist ✅

  • 🧪 Added Runtime tests / UI tests / manual sample — N/A (build/tooling clean-up, no runtime surface)
  • 📚 Docs added/updated — N/A
  • 🖼️ Validated PR Screenshots Compare Test Run results.
  • ❗ Contains NO breaking changes — removed .Server heads were already non-restorable; main build graph unaffected
  • 👀 Reviewed 2 other open pull requests

🤖 Generated with Claude Code

https://claude.ai/code/session_01PqTYB6MEHxNkSz7D78dneL

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

github-actions Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

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


Code Review

  • Gather context from PR description and changed files
  • Review sync generator change (Generator.cs)
  • Review template solution changes (.sln files)
  • Post inline comments for findings
  • Post summary

Overall verdict: ✅ Approve with one missed clean-up

Both changes are correct and well-scoped. One real issue was found that was not addressed in the PR: build/test-scripts/run-netcore-mobile-template-tests.ps1 still references the deleted Server project and will fail CI for the Windows test group.


Finding — missed CI script update (medium, not in diff)

build/test-scripts/run-netcore-mobile-template-tests.ps1 has two stale references to the deleted UnoAppWinUI.Server project that were not cleaned up alongside the solution/file deletions:

Line 44 — entry inside $dotnetBuildNet6Configurations fed to the build loop (lines 50–55):

@("Server", "", ""),

This causes dotnet build … "UnoAppWinUI.Server\UnoAppWinUI.Server.csproj" to be attempted.

Line 60 — a direct, redundant second build call (inside if ($IsWindows)):

& dotnet build -c Debug $default "UnoAppWinUI.Server\UnoAppWinUI.Server.csproj"

Both are under if ( ($TestGroup -eq 0) -and ($env:UWPBuildEnabled -eq 'True') ) — the Windows-only template test group. They will fail with a project-not-found error once this PR merges, since the .csproj file was deleted.

Fix this →


Everything else: LGTM

  • Generator.cs — assertion is correct; verified both Uno.Wasm.csproj and Uno.netcoremobile.csproj carry <ProjectReference> to Uno.UI.Dispatching.*, so the stricter check holds today and will surface future breakage loudly instead of silently degrading generated output.
  • .sln files — ProjectReference entries and all GlobalSection(ProjectConfigurationPlatforms) lines for the Server GUIDs are consistently removed from both UnoAppWinUI.sln and UnoAppWinUILinuxValidation.sln. No dangling GUID entries remain. The .slnf files contain no Server references.
  • Deleted files — standard WASM bootstrap server scaffold; their removal is clean.
  • Commit messages — refactor(sync-generator): and build: both follow Conventional Commits. ✅
  • No new warnings, no event Action/Func violations, no cross-platform concerns in the changed code.

@unodevops

Copy link
Copy Markdown
Contributor

@mergify

mergify Bot commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@MartinZikmund
MartinZikmund disabled auto-merge June 25, 2026 12:02
@MartinZikmund
MartinZikmund enabled auto-merge June 25, 2026 12:02
@mergify

mergify Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

queue

⚠️ Configuration not compatible with a branch protection setting

Details

The branch protection setting Require branches to be up to date before merging is not compatible with draft PR checks. To keep this branch protection enabled, update your Mergify configuration to enable in-place checks: set merge_queue.max_parallel_checks: 1, set every queue rule batch_size: 1, and avoid two-step CI (make merge_conditions identical to queue_conditions). Otherwise, disable this branch protection.

MartinZikmund and others added 2 commits June 25, 2026 14:03
Native/WASM Microsoft.UI.Dispatching symbols are now resolved
transitively through the kept Uno.UWP head. Add Uno.UI.Dispatching to
the platform-head expectedRefs so a missing reference fails the restore
loudly instead of silently stripping the Dispatching native #if defines.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01PqTYB6MEHxNkSz7D78dneL
The UnoAppWinUI / UnoAppWinUILinuxValidation .Server projects only
existed to host the WASM-DOM heads dropped in the native-targets
removal. Their ProjectReference pointed at deleted .Wasm csproj, breaking
restore of the standalone template solutions. Delete the now-purposeless
.Server projects and prune them from the solutions.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01PqTYB6MEHxNkSz7D78dneL
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/nativedrop-followup branch from 10c40c7 to baaeb58 Compare June 25, 2026 12:03
@github-actions

github-actions Bot commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 1m 34s —— View job


Code Review

  • Gather context from PR description and changed files
  • Check if previous finding (stale CI script) was addressed
  • Review Generator.cs assertion change
  • Review template .sln modifications
  • Post inline comments for findings
  • Post summary

Overall verdict: ⚠️ Blocker from previous review still open

Both stated changes are correct and clean. However, the blocker flagged in the previous review — stale UnoAppWinUI.Server references in the CI test script — was not addressed in this push.


Still-open finding — stale CI script (blocker)

build/test-scripts/run-netcore-mobile-template-tests.ps1 still references the deleted Server project on two lines (not in the diff, hence no inline comment):

Line 44 — entry in $dotnetBuildNet6Configurations:

@("Server", "", ""),

This feeds dotnet build … "UnoAppWinUI.Server\UnoAppWinUI.Server.csproj" through the loop at lines 50–55.

Line 60 — direct second build call:

& dotnet build -c Debug $default "UnoAppWinUI.Server\UnoAppWinUI.Server.csproj"

Both are inside if ( ($TestGroup -eq 0) -and ($env:UWPBuildEnabled -eq 'True') ) (Windows-only template test group) and will fail with a project-not-found error once this PR merges.

Fix this →


Everything else: LGTM

  • Generator.cs — assertion and comment are correct; see inline comment. ✅
  • Both .sln files — Project(…) entries and all GlobalSection(ProjectConfigurationPlatforms) lines for the Server GUIDs removed consistently; no dangling GUID entries. ✅
  • Deleted files — standard WASM bootstrap server scaffold; removal is clean. ✅
  • Commit messages — refactor(sync-generator): and build: follow Conventional Commits. ✅
  • No new warnings, no event Action violations, no cross-platform concerns. ✅

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 219769 has failed on Uno.UI - CI.

@MartinZikmund
MartinZikmund merged commit d6ff192 into feature/breakingchanges Jun 26, 2026
64 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/nativedrop-followup branch June 26, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/solution-templates Categorizes an issue or PR as relevant to the solution template

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants