Skip to content

Conversation

@layomia
Copy link
Contributor

@layomia layomia commented Jan 7, 2022

Backport of #62798 to release/6.0

Customer Impact

Fixes reported JSON source gen issue (#62766) where invalid code is generated by JSON source-gen when supporting some constructor parameter default values, preventing successful app compilation. This is likely to be an issue multiple folks hit for a relatively trivial scenario.

Testing

In addition to testing the reported scenario, extensive tests have been added to exercise the generator's handling of default values.

Risk

Low. The code change is scoped to the issue. Changes introduced only affect usage of the source generator, and not System.Text.Json in general.

* Fix bugs with generation for ctor param default values

* Address review feedback

* Address feedback
@layomia layomia added Servicing-consider Issue for next servicing release review area-System.Text.Json labels Jan 7, 2022
@layomia layomia added this to the 6.0.x milestone Jan 7, 2022
@layomia layomia self-assigned this Jan 7, 2022
@ghost
Copy link

ghost commented Jan 7, 2022

Tagging subscribers to this area: @dotnet/area-system-text-json
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #62798 to release/6.0

Customer Impact

Fixes reported JSON source gen issue (#62766) where invalid code is generated by JSON source-gen when supporting some constructor parameter default values, preventing successful app compilation. This is likely to be an issue multiple folks hit for a relatively trivial scenario.

Testing

In addition to testing the reported scenario, extensive tests have been added to exercise the generator's handling of default values.

Risk

Low. The code change is scoped to the issue. Changes introduced only affect usage of the source generator, and not System.Text.Json in general.

Author: layomia
Assignees: layomia
Labels:

Servicing-consider, area-System.Text.Json

Milestone: 6.0.x

@layomia layomia added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jan 7, 2022
@layomia
Copy link
Contributor Author

layomia commented Jan 7, 2022

Approved by Tactics via email.

@danmoseley
Copy link
Member

Test failure already fixed. merging.

@danmoseley danmoseley merged commit 039ab90 into dotnet:release/6.0 Jan 8, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Feb 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Text.Json Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants