Repository navigation
fix(hotreload): do not fork the solution for an add that changed nothing - #24617
Conversation
A pass that mutates nothing must return the original solution instance, so the manager takes its NoChanges short-circuit before reaching the EnC emit. Two paths defeated that: the analyzer-config refresh rewrote every .editorconfig as soon as the change set *requested* an add or a remove — including an add the updater de-duplicates because the document is already in the project, which is what a re-observed file creation looks like — and the removes were applied even for an empty list. Both fork the snapshot, and a forked snapshot is emitted. The refresh now runs only when an add or a remove was actually applied, and compares content before rewriting, as the document texts already did. The cost is not a wasted roundtrip. An update Roslyn resolves to `status: None` corrupts the edit session's deleted-member bookkeeping, and the failure lands on the *next* real edit as a NullReferenceException in DefinitionMap.GetPreviousPropertyHandle (dotnet/roslyn#79898), leaving hot reload dead for the rest of the session. IRL_Case_002 records that sequence in the metadata-update scenarios: edit, empty generation, edit.
|
Claude finished @dr1rrb's task in 3m 39s —— View job Review complete
Verdict: solid, root-cause fix — minor nits only, no blockers. The core change is a correct, root-cause fix rather than a guard: it distinguishes what the change-set requested ( 2 findings posted inline (both low severity, non-blocking):
No cross-cutting concerns: no async/cancellation issues (the existing retry-loop/ Validation performed: code-review by inspection only (diff read in full, cross-referenced against |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24617/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-24617/docs/index.html |
The gate moved from what the change set requested to what the updater actually applied, and only the negative side was covered: a de-duplicated add must not fork the solution. Nothing pinned the positive side, so a regression leaving the flag false for a genuine add would silently stop refreshing analyzer configs — the behaviour the gate exists to preserve. Verified to bite: with the flag assignment removed from the add loop, the new test fails on the config text still reading "is_global = true" instead of the on-disk content.
|
Claude finished @dr1rrb's task in 1m 57s —— View job Review complete
Verdict: still solid — the previously-flagged coverage gap is now closed. 2 new low-severity, non-blocking findings, both in The new commit adds 2 findings posted inline (both low severity, non-blocking, both in
Carried over from the previous review pass (still unresolved, still non-blocking): No cross-cutting concerns: no async/cancellation issues, no platform-targeting or Validation performed: code-review by inspection only (diff since the last-reviewed commit, cross-referenced against |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24617/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-24617/docs/index.html |
… test This repo is public; the field report it cited lives in a private tracker, and AGENTS.md forbids a public spec from carrying a private issue identifier as normative evidence. The observation that matters — the empty update sitting one second before the crashing emit — is kept, without the reference. The test plan also stopped at the de-duplicated add while the same branch added the genuine-add test, so the spec was undercounting its own coverage.
|
Claude finished @dr1rrb's task in 1m 13s —— View job Review complete
Verdict: still solid — this pass confirms both previously-flagged findings are resolved. No new inline comments. Since the last review, the only new commit is
The I confirmed the full PR diff ( No cross-cutting concerns. No blockers. Validation performed: code-review by inspection only (diff since last review, cross-referenced against |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24617/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-24617/docs/index.html |
|
@Mergifyio backport servicing/6.8 release/stable/6.7 |
✅ Backports have been createdDetails
|
…r-24617 fix(hotreload): do not fork the solution for an add that changed nothing (backport #24617)
…6.7/pr-24617 fix(hotreload): do not fork the solution for an add that changed nothing (backport #24617)
Closes #24616
Closes https://github.com/unoplatform/uno.hotdesign/issues/8040
SolutionUpdaternow tracks whether an add or a remove was applied, gates the analyzer-configrefresh on that, and compares config content before rewriting — the same content-level rule spec 055
R1 already applied to document texts.
Tests
Given_SolutionUpdater.When_AddedDocumentIsAlreadyInProject_Then_OriginalSolutionInstanceReturnedfails without the fix (the solution is forked) and passes with it.
IRL_Case_002records the field sequence inMetadataUpdateTests: edit, empty generation,edit ->
NullReferenceExceptioninDefinitionMap.GetPreviousPropertyHandle. MarkedIsCrashingRoslyn, like the existingWhen_Page_Res_xBind_Remove, so it reportsInconclusiveuntil HR fails when requesting an intermediate empty update dotnet/roslyn#79898 is fixed.Uno.HotReload.Tests: 147/147.Not addressed
The unrealized-text bypass of spec 055 R1 stays as-is: comparing an unrealized document would
re-read the file and could swallow a first edit. Closing it requires remembering what the current
compilation saw, which is a design change of its own.