Uh oh!
There was an error while loading. Please reload this page.
[release/6.0] Emit diagnostics & exceptions for sourcegen handling init-only properties & JsonInclude attributes - #59097
Conversation
ghost
commented
Sep 14, 2021
Tagging subscribers to this area: @eiriktsarpalis, @layomia Issue DetailsBackport of #58993 to release/6.0 /cc @eiriktsarpalis Customer ImpactTestingRisk
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
steveharter
commented
Sep 14, 2021
@eiriktsarpalis do you want to get into |
@steveharter I've already cherry picked the changes in #59104 |
danmoseley
commented
Sep 15, 2021
@MattGal can you remind me of the telltale signature of the issue you added retries for? is this one? |
danmoseley
commented
Sep 15, 2021
@lewing the JSON "failure" in net6.0-Browser-Release-wasm-Mono_Release-normal-Ubuntu.1804.Amd64.Open is another one where there seems to be no relevant info. What should we do in case of failures like this? |
danmoseley
commented
Sep 15, 2021
Edited template to add customer reported (which helps us make decisions) and link. |
danmoseley
commented
Sep 15, 2021
Approved. Fixes customer reported blocker in new generator feature. Changes are entirely limited to generator. |
danmoseley
commented
Sep 15, 2021
Restarting to pick up fix for #59136 |
eiriktsarpalis
commented
Sep 15, 2021
We seem to have merge conflicts, I'll see if I can rebase on top of the latest release/6.0 |
be8bd9f to
ad0e10bCompareMattGal
commented
Sep 15, 2021
Yes, this looks like it's cut off from the specific error message but otherwise it looks like that problem and an 8/11 SDK would not have the change (the first, IIRC, was |
danmoseley
commented
Sep 15, 2021
@ViktorHofer thoughts about picking up Matt's fix in release/6.0? It seems proven now in main and we'll be servicing out of 6.0 for years. |
ViktorHofer
commented
Sep 15, 2021
Absolutely. e72aafc was merged earlier today which includes Matt's fix. |
MattGal
commented
Sep 15, 2021
Was typing similar. I think no more actions needed though once you have arcade updates you could remove the variables from your common .yml place (that was for before Arcade was updated) |
danmoseley
commented
Sep 15, 2021
Oh great, I just missed it here then. |
Backport of #58993 to release/6.0
/cc @eiriktsarpalis
Customer Impact
Customer reported #58770
Source generation mode currently does not support deserializing classes with init-only properties. Furthermore, it cannot support private properties that have been marked with the
JsonIncludeattribute. Current behavior is to silently ignore these conditions and not deserialize the impacted properties at all. This PRInvalidOperationExceptionis thrown.Moreover it is making a related improvement in which source generated exception messages have been moved to the project's resource strings. #58292
Testing
Testing has been added validating both the compile-time diagnostic messages and the runtime exceptions.
Risk
Low. Relatively straightforward changes to product code to account to account for init-only property and JsonInclude attribute detection.