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-preview7] Fix binding logic for dictionaries with complex elements #89193

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jul 19, 2023

Backport of #89117 to release/8.0-preview7

/cc @layomia

Customer Impact

This change corrects the binding logic emitted by the configuration binding generator, for dictionaries with complex element types. The emitted code currently causes a compilation error. This issue was reported by a community member (#89010).

A complex element type is parsed from IConfiguration instances that have child sections, similar to parsing from a JSON object or array. This differs from types that are parsed from strings, e.g. primitives like string and int.

We expect that having complex dictionary elements as part of target configuration type graphs is fairly common. Fixing this bug would unblock further usage of the generator in the reported issue, and likely many other customers as the feature is used more.

Testing

Unit tests have been added for complex collection elements, for both dictionaries and lists. The new tests also cover the reported use case. Existing tests verify that This also verifies that the compilation problem is now fixed.

Risk

Low; It's a one-line test fix.

@layomia layomia self-assigned this Jul 19, 2023
@layomia layomia added this to the 8.0.0 milestone Jul 19, 2023
@ericstj ericstj added the Servicing-consider Issue for next servicing release review label Jul 19, 2023
@ericstj ericstj added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jul 19, 2023
@ericstj ericstj merged commit 854cc2c into release/8.0-preview7 Jul 19, 2023
@ericstj
Copy link
Member

ericstj commented Jul 19, 2023

Merged as this was passing validation prior to merge.

@carlossanlop carlossanlop deleted the backport/pr-89117-to-release/8.0-preview7 branch July 19, 2023 20:18
@ghost ghost locked as resolved and limited conversation to collaborators Aug 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.

3 participants