Skip to content

[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

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

github-actions[bot]
Copy link
Contributor

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

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 the TimeSpan 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, 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.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 16, 2023
@tarekgh tarekgh added Servicing-consider Issue for next servicing release review area-Extensions-Options source-generator Indicates an issue with a source generator feature labels Nov 16, 2023
@tarekgh tarekgh added this to the 8.0.x milestone Nov 16, 2023
@ghost
Copy link

ghost commented Nov 16, 2023

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

Issue Details

Backport of #94798 to release/8.0-staging

/cc @tarekgh

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:

Servicing-consider, area-Extensions-Options, source-generator, needs-area-label

Milestone: -

@tarekgh tarekgh self-assigned this Nov 16, 2023
@tarekgh tarekgh removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 16, 2023
@eerhardt
Copy link
Member

eerhardt commented Nov 16, 2023

Can you add the necessary package authoring? (or am I too quick on the review 😄 ?)

@tarekgh
Copy link
Member

tarekgh commented Nov 16, 2023

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 :-)

@tarekgh
Copy link
Member

tarekgh commented Nov 16, 2023

@eerhardt package authoring is done.

@tarekgh tarekgh added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Nov 17, 2023
@tarekgh
Copy link
Member

tarekgh commented Nov 17, 2023

This is approved offline

@tarekgh
Copy link
Member

tarekgh commented Nov 17, 2023

CC @carlossanlop for package authoring

Copy link
Member

@carlossanlop carlossanlop left a 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>
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

@tarekgh tarekgh merged commit 1f53b81 into release/8.0-staging Nov 17, 2023
@tarekgh tarekgh deleted the backport/pr-94798-to-release/8.0-staging branch November 17, 2023 01:31
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2023
@akoeplinger akoeplinger modified the milestones: 8.0.x, 8.0.2 Dec 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Extensions-Options Servicing-approved Approved for servicing release source-generator Indicates an issue with a source generator feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants