Repository navigation
fix(hr): never commit an EnC baseline for an update that was not applied (backport #24085) (6.8) - #25946
Conversation
When Roslyn throws while emitting a Hot Reload delta (e.g. dotnet/roslyn#86045), the pass fell into the manager's catch-all and completed as InternalError. The EnC baseline does not move, so every later edit failed the same way until the app restarted, with nothing telling the user that undoing the edit recovers. Exceptions thrown by EmitSolutionUpdateAsync (cancellation excepted) now complete the operation as RudeEdit with a synthesized UNOHR0001 diagnostic asking the user to undo the change or restart the app. The full exception is still logged at Warn level. Exceptions anywhere else in the pass stay InternalError. Fixes #25418 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WjQPjTHecnxjgcqBhM8z3e (cherry picked from commit 2f6759a)
Adds a Hot Reload Errors section to the error codes page: what the diagnostic means, that undoing the change or restarting the app recovers, and the known cause (dotnet/roslyn#86045). Adds UNOHR to the cSpell word list. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WjQPjTHecnxjgcqBhM8z3e (cherry picked from commit a59b726)
The emit failure now uses Roslyn's ENC1002 ("Cannot apply changes --
unexpected error"), which Roslyn itself uses for an internal error
treated as a blocking rude edit, so no Uno-specific id is needed.
This reverts commit a59b726.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WjQPjTHecnxjgcqBhM8z3e
(cherry picked from commit 2d90b5b)
Roslyn already has an id for this case: ENC1002 ("Cannot apply changes
-- unexpected error"), which EmitSolutionUpdateResults.CreateFromInternalError
uses for an internal error treated as a blocking rude edit. The
synthesized diagnostic now uses it, keeping the message that says how to
recover, and the rude-edit filter is back to accepting ENC ids only.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WjQPjTHecnxjgcqBhM8z3e
(cherry picked from commit 855e34d)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0113rBQqDXVtD6eMXC8Eygn7 (cherry picked from commit 805434b)
ENC ids belong to Roslyn. The synthesized diagnostic goes back to an Uno id, UNOHR0001, and the rude-edit filter accepts it alongside the ENC ids. This reverts commit 855e34d. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0113rBQqDXVtD6eMXC8Eygn7 (cherry picked from commit 12a7866)
Restores the Hot Reload Errors entry for UNOHR0001 and the UNOHR cSpell word. This reverts commit 2d90b5b. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0113rBQqDXVtD6eMXC8Eygn7 (cherry picked from commit d5d3473)
|
Claude finished @agneszitte's task in 1m 54s —— View job Review complete
Verdict: ship — no blocking issues found. No inline comments posted (none warranted). SummaryThis is a faithful cherry-pick of the already-reviewed/merged master fix (#24085) onto What I checked:
No cross-cutting concerns beyond what's already called out in the PR description (merge-order dependency on |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-25946/docs/index.html |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-25946/docs/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
GitHub Issue: Related to #25378
Backport of #24085 to
servicing/6.8. Studio 3.3 needs it (confirmed by Steve).Merge after #25495 (the 6.8 backport of #25420). This fix builds on it, so this branch also contains its commits. Once it merges, this PR shows only its own commit.
PR Type:
🐞 Bugfix
What changed? 🚀
After one rude edit, every later Hot Reload edit was reported as applied but was lost until the app restarted (Roslyn 5.x). A rejected update no longer moves the Edit-and-Continue baseline: the emit now commits or discards it explicitly. Same change as the master PR; it applies cleanly.
PR Checklist ✅
Uno.HotReload.Testspass locally (157 passed, 1 Unix-only skipped), andUno.HotReloadbuilds for net9.0 and net10.0🤖 Generated with Claude Code