You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hot reload: suppressing source-generator errors for the EnC emit also removes them from reported diagnostics (UXAML0001 replaced by ENC0020) #24022
@dr1rrb — follow-up to #24012, which I confirmed fixes the case it targeted. This is about a side effect of the suppression.
Summary
#24012 suppresses source-generator error diagnostics for the EnC emit so a broken input (e.g. a corrupt .resw) degrades to stale generated output instead of freezing hot reload. That works. But the suppression also removes those diagnostics from what the hot-reload operation reports, so when the file the user just edited is itself invalid, the actionable error is replaced by a misleading one.
Observed
Editing MainPage.xaml into malformed XAML, then running a hot-reload cycle:
The real error is still produced — it appears in the build trace:
…/Presentation/MainPage.xaml(6,2): error UXAML0001: Name cannot begin with the '<' character,
hexadecimal value 0x3C. Line 6, position 2.
…but it never reaches the operation's diagnostics. The generator, given invalid XAML, emits degraded code that differs structurally enough to trip a rude edit, and that is what surfaces.
So a user who mistypes XAML is told "Renaming method IMainPage_Bindings.UpdateResources() requires restarting the application" — naming generated code they never wrote and never see — instead of "line 6, position 2: name cannot begin with '<'".
The Failed/RudeEdit outcome itself is still correct; only the reported diagnostic regressed.
Suppress the generator error's blocking effect while still surfacing it — or, if the blocking and reporting paths can't be separated cleanly, only suppress diagnostics whose source file is outside the change set. The change-set membership above is a clean discriminator between the two cases and preserves #24012's fix intact.
Repro
Take a project with a MainPage.xaml.
Overwrite it with malformed XAML (e.g. an unclosed element).
Run a hot-reload cycle and inspect the operation's diagnostics.
Expected: a diagnostic identifying the XAML syntax error.
Actual: ENC0020 naming a generated IMainPage_Bindings member.
Impact
A downstream consumer has a runtime test asserting UXAML0001 appears in the hot-reload operation's diagnostics; it fails deterministically on Uno SDK 6.8.0-dev.6 (3/3 CI attempts, Desktop and Wasm) and passes on 6.7.0-dev.938. Beyond the test, the user-facing effect is that a XAML typo during hot reload no longer says what is wrong or where.
Activity
fix(hr): report suppressed source-generator errors on the operation
fix(hr): report suppressed source-generator errors on the operation