-
Notifications
You must be signed in to change notification settings - Fork 5k
[release/8.0-staging] Support TimeSpan with RangeAttribute in Options validation source generator #94857
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-staging] Support TimeSpan with RangeAttribute in Options validation source generator #94857
Conversation
Tagging subscribers to this area: @dotnet/area-extensions-options Issue DetailsBackport of #94798 to release/8.0-staging /cc @tarekgh Customer ImpactTestingRiskIMPORTANT: If this backport is for a servicing release, please verify that:
|
Can you add the necessary package authoring? (or am I too quick on the review 😄 ?) |
Yes, I am doing that. and you are too quick on the review :-) |
@eerhardt package authoring is done. |
This is approved offline |
CC @carlossanlop for package authoring |
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.
Ship it
@@ -5,7 +5,7 @@ | |||
<EnableDefaultItems>true</EnableDefaultItems> | |||
<IsPackable>true</IsPackable> | |||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | |||
<ServicingVersion>1</ServicingVersion> | |||
<ServicingVersion>2</ServicingVersion> |
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.
LGTM
Fixes #94119
Backport of #94798 to release/8.0-staging
/cc @tarekgh
Customer Impact
Users who compile their app as AOT and utilize the Options validation source generator while referencing any library that employs the
RangeAttribute
with theTimeSpan
type may encounter linker warnings, hindering a clean build. This issue has been reported in cases where Aspire references extensions libraries, such as https://github.com/dotnet/extensions/tree/main/src/Libraries/Microsoft.Extensions.Http.Resilience?rgh-link-date=2023-11-16T15%3A55%3A21Z.Testing
I successfully navigated through all regression tests and incorporated additional test cases to encompass the scenarios being addressed. Moreover, I conducted manual testing with AOT. @eerhardt provided assistance in confirming that these modifications effectively resolve the issue outlined in #94798 (comment).
Risk
Low, the modifications are specifically targeted to address scenarios involving the handling of RangeAttribute when it comes across the TimeSpan type.
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.