Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/8.0] Make src gen for property setters consistent with reflection #92167

Merged
merged 6 commits into from
Sep 18, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 16, 2023

Backport of #91899 to release/8.0. Fixes

Customer Impact

Aligns source-gen binding of object properties that have no value in input configuration objects with the reflection behavior, that is to set them to their default values. The important aspect of this change is that we call the setters for this property; some users have a dependency on this behavior to define custom behavior when config is missing. A regression from this behavior in .NET 7 had to be fixed in servicing (#80562), and has already been reported in RC-1 (#91380). So we don't think that we can afford the current divergence in the 8.0 release.

Testing

We added tests for the reported scenarios & added more tests further validating the change.

Risk

Low. Contained fix for off-by-default component.

@ghost
Copy link

ghost commented Sep 16, 2023

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

Issue Details

Backport of #91899 to release/8.0

/cc @ericstj @steveharter

Customer Impact

Testing

Risk

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-Extensions-Configuration

Milestone: -

@carlossanlop
Copy link
Member

@steveharter can you please fill out the template?

@layomia can you please also sign-off this backport?

cc @ericstj

@carlossanlop carlossanlop added this to the 8.0.0 milestone Sep 16, 2023
@layomia layomia added the Servicing-consider Issue for next servicing release review label Sep 17, 2023
@ericstj
Copy link
Member

ericstj commented Sep 18, 2023

Will review.

Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved - this scenario is an important one that we know our customers care about (since we had to restore it after a previous regression).

Fix looks low-risk. Most of the churn here is to the baseline txt files that record the output of the generator.

The only test that changed was the one that observed this difference, and new tests have been added.

@artl93 can you please have a look.

Copy link
Member

@artl93 artl93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M2 Approved.

@artl93 artl93 added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 18, 2023
@carlossanlop carlossanlop merged commit 1cbf763 into release/8.0 Sep 18, 2023
@carlossanlop carlossanlop deleted the backport/pr-91899-to-release/8.0 branch September 18, 2023 19:50
@radical radical mentioned this pull request Sep 26, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants