-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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] Options Source Gen Fixes #91432
Conversation
Tagging subscribers to this area: @dotnet/area-extensions-options Issue DetailsBackport of #91363 to release/8.0 /cc @tarekgh Customer ImpactTestingRiskIMPORTANT: If this backport is for a servicing release, please verify that:
|
CC @jeffhandley |
There was a problem hiding this 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. It improves performance/quality of a new .NET 8 feature.
@carlossanlop to merge once CI completes
Fixes #90990
Fixes #91073
Backport of #91363 to release/8.0
/cc @tarekgh
Customer Impact
The options validation source generator was introduced in .NET 8.0. The changes made here serve to finalize this feature while addressing reliability and performance issues.
Random
in the source generator and instead use the module name hash. Options source generator shouldn't use random names #90990!
when callingValidator.TryValidateValue
IEnumerable<T>
and tagged with the attributeValidateEnumeratedItems
Testing
Regression tests in addition to adding more tests to cover the newly introduced scenarios.
Risk
While the modifications did introduce some minor alterations to the generated code, they did not impact the underlying logic of how the generated code functions, except for addressing the listed issues. There were no significant revisions made to the source generator itself.
IMPORTANT: If this backport is for a servicing release, please verify that:
The PR target branch is
release/X.0-staging
, notrelease/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.