Skip to content

fix(build): Diff 6.8 packages with the latest 6.7 - #26540

Merged
agneszitte merged 1 commit into
servicing/6.8from
dev/agzi/68-pin-package-diff-baseline
Nov 16, 2026
Merged

agneszitte merged 1 commit into
servicing/6.8from
dev/agzi/68-pin-package-diff-baseline

Conversation

@agneszitte

@agneszitte agneszitte commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

GitHub Issue: closes #26539

PR Type:

🏗️ Build or CI related changes

What changed? 🚀

  • Before: every pull request into servicing/6.8 fails "Generate NuGet Packages". The package diff compares 6.8 with the latest stable on nuget.org, which has been 7.0 since Tue 2026-11-10, and reports the 428 APIs 7.0 added as removed.
  • Now: servicing/6.8 compares with the latest 6.7 release on nuget.org (UnoPackageDiffBaselineLine = 6.7). CI reads that version on each build, so 6.7 service releases (SR5 and later) need no change here.
    • It takes the latest 6.7 version that all 23 compared packages have, so a release still being pushed to nuget.org, or one missing a package, is skipped (the log says so) instead of failing every 6.8 pull request.
    • CI downloads the 23 baseline packages and passes them to generatepkgdiff as files. The tool can't take a version: given an id, it always takes the latest stable.
    • UnoPackageDiffBaselineVersion compares with one exact version instead. With neither property set, the diff works as before.
    • The build log shows the baseline used: Package diff baseline: 6.7.424.
  • Comparing with the release a servicing branch must stay compatible with is how .NET package validation is meant to be used. dotnet/runtime servicing branches compare with their own release (release/9.0 with 9.0.0).
  • breaking-changes.md describes the two properties.
Local check

ValidatePackage run on this branch with the 6.8.0-dev.413 packages from nuget.org, and Uno.PackageDiff 1.1.0-dev.29 like CI:

  • Default, with Visual Studio's MSBuild (as CI) and with dotnet msbuild: picks 6.7.424, compares 23 of 23 packages, 0 errors.
  • UnoPackageDiffBaselineVersion=6.7.359: compares with 6.7.359, 0 errors.
  • No line: downloads 7.0.65 and gives the same 428 errors as CI.
  • Line 7.0, where no version has all 23 packages: stops with "No stable 7.0.x version is on nuget.org for all the compared packages".
  • The version pick alone, on two crafted version lists (one with an extra 6.7.500, one pretty-printed): picks 6.7.424 and logs that 6.7.500 isn't on nuget.org for all packages yet, with both MSBuild hosts.
  • Every 6.0 to 6.7 release on nuget.org has all 23 packages.

PR Checklist ✅

CI only. This PR's own "Generate NuGet Packages" step is the check that it works on the agents.

🤖 Generated with Claude Code

@agneszitte agneszitte added the area/build Categorizes an issue or PR as relevant to build infrastructure label Nov 16, 2026
@mergify

mergify Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@agneszitte
agneszitte marked this pull request as draft November 16, 2026 18:09
@agneszitte
agneszitte force-pushed the dev/agzi/68-pin-package-diff-baseline branch from c0f019d to c9a4ec7 Compare November 16, 2026 18:15
@agneszitte agneszitte changed the title fix(build): Diff 6.8 packages against 6.7.424 fix(build): Diff 6.8 packages with the latest 6.7 Nov 16, 2026
@unoplatform unoplatform deleted a comment from github-actions Bot Nov 16, 2026
@agneszitte
agneszitte marked this pull request as ready for review November 16, 2026 18:17
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @agneszitte's task in 2m 37s —— View job


Review complete ✅

  • Gather context (diff, issue, repo rules)
  • Review build/Uno.UI.Build.csproj changes
  • Review doc/articles/contributing/guidelines/breaking-changes.md changes
  • Post inline comments for findings
  • Post summary

Verdict: Ship — no blocking issues found. No inline comments posted (0 findings of note).

Summary

Reviewed the new UnoPackageDiffBaselineLine/UnoPackageDiffBaselineVersion properties, the _UnoResolveLatestVersionOfLine inline Roslyn task, and the restructured ValidatePackage target in build/Uno.UI.Build.csproj, plus the corresponding breaking-changes.md doc update.

Checked carefully and found correct:

  • The version-extraction regex ("(6\.7\.\d+)") correctly anchors on surrounding quotes, so it skips pre-release versions (6.7.424-dev.1) and doesn't false-positive on unrelated lines (e.g. 16.7.5), matching the documented "picks highest stable Major.Minor.Patch" behavior.
  • DownloadFile's batching over %(_diffPackage.BaselineId) correctly fires once per package (23 downloads), consistent with the PR description.
  • The Condition="'$(UnoPackageDiffBaselineLine)'==''" default-assignment pattern on line 254 correctly defers to a caller-supplied global property (including an explicitly empty one via -p:UnoPackageDiffBaselineLine=), which is how the PR's own "no line" local-check scenario produces the old (7.0 baseline) behavior — standard MSBuild global-property precedence, not a bug.
  • Braces/tabs/style conventions are followed in the new inline C# task and XML.
  • Change is narrowly scoped to the build file + its doc, consistent with the stated intent (CI-only, no app code touched), and the PR body documents concrete local validation across all four code paths (default, exact-version override, no-line fallback, invalid-line error).

No cross-cutting concerns beyond what's noted above. One non-blocking observation for awareness, not a defect: if a package is ever added to the _diffPackage list that didn't exist yet at the resolved 6.7 baseline version, its DownloadFile call would 404 and fail the build — not an issue today (23/23 packages matched per the PR's local check) but worth remembering if the package list changes on this branch.

Comment thread build/Uno.UI.Build.csproj Resolved
Comment thread build/Uno.UI.Build.csproj Resolved
@unoplatform unoplatform deleted a comment from github-actions Bot Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @agneszitte's task in 2m 0s —— View job


Review complete ✅

  • Gather context (diff, prior review comments, issue)
  • Review build/Uno.UI.Build.csproj changes (full diff including new commit)
  • Review doc/articles/contributing/guidelines/breaking-changes.md changes
  • Check whether the new commit (b609de61) addresses the two prior inline findings
  • Post inline comments for any new findings
  • Post summary

Verdict: Ship — no new blocking issues. No new inline comments posted.

Summary

This review covers the state after the new commit b609de61 ("Skip 6.7 releases missing a package"), pushed since the last automated review.

  • Prior finding Setting Image.Source to local image (added as "Content" to Assets/ folder in UWP project) leads to WASM app never going past the Splashscreen #1 (lockstep-version assumption) is resolved. The previous version picked the baseline solely from Uno.WinUI's version list, assuming all 23 diffed packages ship in lockstep — risking a hard CI failure for every servicing/6.8 PR if one package lagged. The new commit downloads each package's own nuget.org flat-container version index and resolves _UnoResolveLatestVersionOfLine to the intersection of versions common to all of them (via HashSet<Version>.IntersectWith), falling back to an older common patch and logging a high-importance message when the newest release isn't fully published yet. This is a root-cause fix, not a guard — verified by reading the updated task logic in build/Uno.UI.Build.csproj:259-310.
  • Prior finding Paths are either not shown or shown not as in the UWP Designer #2 (regex vs. JSON parsing of the nuget.org version index) was not changed, but the author added an inline comment explaining the tradeoff (no System.Text.Json dependency available to a RoslynCodeTaskFactory task running under classic .NET Framework MSBuild). That justification is reasonable for this narrow build-infra context, and the original comment already called this non-blocking — no new finding warranted.
  • No other correctness, style, or doc issues found in the incremental diff. MSBuild item/property semantics (batched DownloadFile over %(_diffPackage.BaselineId), global-property precedence for UnoPackageDiffBaselineLine/Version) check out, and breaking-changes.md accurately describes both properties.
    · branch dev/agzi/68-pin-package-diff-baseline

@agneszitte
agneszitte force-pushed the dev/agzi/68-pin-package-diff-baseline branch from b609de6 to f90d81c Compare November 16, 2026 18:35
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @agneszitte's task in 1m 36s —— View job


Review complete ✅

  • Gather context (diff, prior reviews, issue)
  • Review build/Uno.UI.Build.csproj changes
  • Review doc/articles/contributing/guidelines/breaking-changes.md changes
  • Post inline comments for new findings (if any)
  • Post summary

Verdict: Ship — 0 new findings. No inline comments posted.

Summary

Re-reviewed the current state of build/Uno.UI.Build.csproj (the UnoPackageDiffBaselineLine/UnoPackageDiffBaselineVersion properties, the _UnoResolveLatestVersionOfLine inline Roslyn task, and the restructured ValidatePackage target) and breaking-changes.md against AGENTS.md's review checklist (SOLID/clarity, async/cancellation, cross-platform correctness, DependencyProperty rules, allocations, test coverage, XAML conventions, release-build cleanliness, code style, Conventional Commits, event delegate types). Most of these categories are not applicable here — this is build-infrastructure MSBuild/inline-C# code with no async paths, no DependencyProperty, no XAML, and no shipped runtime surface.

Both findings from the earlier review rounds on this PR are resolved in the current diff:

  • The lockstep-baseline-version risk is fixed: the task now downloads each of the 23 packages' own nuget.org flat-container version index and resolves the baseline to the intersection of common versions (HashSet<Version>.IntersectWith), logging when the newest release isn't fully published yet, instead of assuming all packages ship on the same cadence.
  • The regex-vs-JSON-parsing nit was addressed with an explanatory comment (build/Uno.UI.Build.csproj:259-262) justifying the regex given the RoslynCodeTaskFactory task runs under classic .NET Framework MSBuild without a convenient System.Text.Json reference, plus verification that the quoted-string match is robust to formatting changes.

No new correctness, style, or doc issues found. Braces, tabs, and MSBuild batching/property-precedence semantics (DownloadFile batched over %(_diffPackage.BaselineId), Condition-gated default-property assignment) all check out. Non-blocking, already-noted caveat for awareness: if a package that never had a 6.7.x release (e.g. a brand-new package added to the _diffPackage list in a future 6.8 patch) is added to this list, the intersection would always be empty and ValidatePackage would hard-fail with "No stable 6.7.x version..." — not an issue today since all 23 current packages have full 6.0–6.7 history per the PR's local validation.
· branch dev/agzi/68-pin-package-diff-baseline

@unodevops

Copy link
Copy Markdown
Contributor

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

The package diff compared 6.8 with the latest stable on nuget.org, 7.0
since it shipped, and reported all the API 7.0 added as removed. Compare
with the latest 6.7 release instead: the latest 6.7 version that all the
compared packages have on nuget.org, read on each build, so 6.7 service
releases need no change and a release still being pushed is skipped.
The baseline is passed to generatepkgdiff as downloaded packages, as the
tool only resolves an id to the latest stable.

Fixes #26539

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@agneszitte
agneszitte force-pushed the dev/agzi/68-pin-package-diff-baseline branch from f90d81c to ecf2f6b Compare November 16, 2026 20:40
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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


Review complete ✅

  • Gather context (diff, prior review rounds, issue)
  • Review build/Uno.UI.Build.csproj current state against AGENTS.md
  • Review doc/articles/contributing/guidelines/breaking-changes.md
  • Post inline comments for any new findings
  • Post summary

Verdict: Ship — 0 findings. No inline comments posted.

Summary

The branch's single commit (ecf2f6bb) already incorporates the fixes from the three prior automated review rounds on this PR: the baseline version is resolved as the intersection of each of the 23 packages' own nuget.org version indexes (not assumed lockstep from Uno.WinUI alone), and the regex-vs-JSON parsing choice in _UnoResolveLatestVersionOfLine is justified with an inline comment (no System.Text.Json reference available to a RoslynCodeTaskFactory task under classic .NET Framework MSBuild).

I re-read the current state of build/Uno.UI.Build.csproj (lines 246–412) and breaking-changes.md independently against AGENTS.md's review checklist — this is build-infrastructure MSBuild/inline-C# with no async paths, DependencyProperty, XAML, or shipped runtime surface, so most checklist categories don't apply. Specific things I verified by inspection and found correct:

  • The anchored quote regex ("(6\.7\.\d+)") rejects pre-release suffixes (6.7.424-dev.1, no quote directly after the digits) and substring false-positives (16.7.5, no quote directly before 6).
  • VersionIndexFiles and the per-version baseline .nupkg downloads now live under distinct subdirectories (PackageDiffBaseline\versions\ vs PackageDiffBaseline\<version>\), avoiding the filename collision risk a prior round's shared-directory approach would have had.
  • DownloadFile/_UnoResolveLatestVersionOfLine batch/transform correctly over %(_diffPackage.BaselineId), and execute in the right sequence relative to the item-list transform that reads the downloaded files back.
  • UnoPackageDiffBaselineVersion (exact pin) correctly short-circuits both the line-resolution downloads and _UnoResolveLatestVersionOfLine via its Condition, and an explicitly-empty UnoPackageDiffBaselineLine correctly falls back to the pre-existing behavior (diff against nuget.org's latest stable) — matching the PR's documented local-check matrix.
  • breaking-changes.md's new paragraph accurately describes both properties and why servicing/6.8 needs this.
  • Conventional Commits title/body, tabs/braces style, and scope (build file + its doc only) all conform.

No cross-cutting concerns beyond the already-acknowledged, non-blocking caveat from earlier rounds: a brand-new package added to the _diffPackage list that has no 6.7.x release would make the intersection empty and hard-fail ValidatePackage — not a risk today since all 23 current packages have full 6.0–6.7 history per the PR's local validation.
· branch dev/agzi/68-pin-package-diff-baseline

@unodevops

Copy link
Copy Markdown
Contributor

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

@unodevops

Copy link
Copy Markdown
Contributor

@agneszitte
agneszitte merged commit 08e60ff into servicing/6.8 Nov 16, 2026
59 of 61 checks passed
@agneszitte
agneszitte deleted the dev/agzi/68-pin-package-diff-baseline branch November 16, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants