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] Update binder gen emitted-interceptor nullability to match framework impl #91359

Merged

Conversation

layomia
Copy link
Contributor

@layomia layomia commented Aug 30, 2023

Backport of #91180 to release/8.0
Fixes #90987 for 8.0.

Customer Impact

Updates null input handling by the generated replacement binding methods to align with the reflection-based implementation. This follows the general user expectation of consistency between the two implementations.

Testing

Automated null handling tests have been added for all parameters of all binder methods. They assert the same behavior for source-gen and reflection. Some null refs in the reflection binder were fixed as well. This also provides complete build coverage for all binding inputs.

Risk

Low. It's a contained fix for an off-by-default component.

cc @carlossanlop.

@layomia layomia added Servicing-consider Issue for next servicing release review area-Extensions-Configuration labels Aug 30, 2023
@layomia layomia added this to the 8.0.0 milestone Aug 30, 2023
@ghost ghost assigned layomia Aug 30, 2023
@ghost
Copy link

ghost commented Aug 30, 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 #91180 to release/8.0
Fixes #90987 for 8.0.

Customer Impact

Updates null input handling by the generated replacement binding methods to align with the reflection-based implementation. This follows the general user expectation of consistency between the two implementations.

Testing

Automated null handling tests have been added for all parameters of all binder methods. They assert the same behavior for source-gen and reflection. Some null refs in the reflection binder were fixed as well. This also provides complete build coverage for all binding inputs.

Risk

Low. It's a contained fix for an off-by-default component.

cc @carlossanlop.

Author: layomia
Assignees: -
Labels:

Servicing-consider, area-Extensions-Configuration

Milestone: 8.0.0

@layomia layomia requested a review from eerhardt August 30, 2023 22:23
Copy link
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

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

This is approved for RC2 as it improves the quality of a new .NET 8 feature. I had a couple non-blocking questions in the review.

Comment on lines +329 to +338
// -----------------------------------------------------------------------------------------------------------------------------
// | bindingPoint | bindingPoint |
// Interface | Value | IsReadOnly | Behavior
// -----------------------------------------------------------------------------------------------------------------------------
// ISet<T> | not null | true/false | Use the Value instance to populate the configuration
// ISet<T> | null | false | Create HashSet<T> instance to populate the configuration
// ISet<T> | null | true | nothing
// IReadOnlySet<T> | null/not null | false | Create HashSet<T> instance, copy over existing values, and populate the configuration
// IReadOnlySet<T> | null/not null | true | nothing
// -----------------------------------------------------------------------------------------------------------------------------
Copy link
Member

Choose a reason for hiding this comment

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

These comments with the table of scenarios is really helpful

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah the source gen impl followed this closely.

@jeffhandley jeffhandley added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 31, 2023
@carlossanlop carlossanlop merged commit 35f043f into dotnet:release/8.0 Aug 31, 2023
103 of 110 checks passed
@radical radical mentioned this pull request Sep 26, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 1, 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.

4 participants