Uh oh!
There was an error while loading. Please reload this page.
[release/6.0] Throw on unsupported types in src gen - #58983
Conversation
ghost
commented
Sep 11, 2021
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
ghost
commented
Sep 11, 2021
Tagging subscribers to this area: @eiriktsarpalis, @layomia Issue DetailsBackport of #58775 to release/6.0 /cc @eiriktsarpalis@steveharter Customer ImpactTestingRisk
|
Anipik
commented
Sep 13, 2021
cc @danmoseley |
| { | ||
| // Append the property name. | ||
| string? propertyName = frame.DeclaredJsonPropertyInfo?.MemberInfo?.Name; | ||
| string? propertyName = frame.DeclaredJsonPropertyInfo?.ClrName; |
There was a problem hiding this comment.
is this a functional change for the non-generator scenario?
danmoseley
commented
Sep 13, 2021
Approved. Fixes fairly mainstream scenario in this new feature. Code change essentially limited to generators. |
danmoseley
commented
Sep 13, 2021
If we consider future fixes to the generator, it would reduce risk if it was possible to make zero changes to the non generator codepaths. |
Backport of #58775 to release/6.0
/cc @eiriktsarpalis@steveharter
Customer Impact
Types unsupported by sourcegen are currently being silently serialized (typically as
{}). This can result in invalid data accidentally being returned in API responses or written to databases.Testing
Tests have been added affirming the new throwing behavior.
Risk
Low. While this is adding more code to the sourcegen implementation, these additions are relatively small and straightforward.