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

Address remaining trim warnings #4962

Merged
merged 1 commit into from
Feb 22, 2024
Merged

Address remaining trim warnings #4962

merged 1 commit into from
Feb 22, 2024

Conversation

eerhardt
Copy link
Member

@eerhardt eerhardt commented Feb 21, 2024

Fix #4002

FYI @EricStG

Microsoft Reviewers: Open in CodeFlow

@@ -142,6 +143,11 @@ public static IStandardHedgingHandlerBuilder AddStandardHedgingHandler(this IHtt
return new StandardHedgingHandlerBuilder(builder.Name, builder.Services, routingBuilder);
}

[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
Justification = "The EmptyResilienceStrategyOptions doesn't have any properties to validate.")]
private static ResiliencePipelineBuilder<HttpResponseMessage> AddStrategy(this ResiliencePipelineBuilder<HttpResponseMessage> builder, Func<StrategyBuilderContext, ResilienceStrategy> factory) =>
Copy link
Member Author

Choose a reason for hiding this comment

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

@martintmk - do you think Polly could expose this API instead? That way callers wouldn't have to define an empty ResilienceStrategyOptions class and suppress the warning.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could. Could you create an issue in Polly repo?

Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines -19 to -20
<!-- See https://github.com/dotnet/extensions/issues/4395 -->
<NoWarn>$(NoWarn);TBD</NoWarn>
Copy link
Member

Choose a reason for hiding this comment

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

🎉

@eerhardt eerhardt merged commit 3b8be08 into dotnet:main Feb 22, 2024
6 checks passed
@eerhardt eerhardt deleted the Fix4002 branch February 22, 2024 16:37
@xakep139 xakep139 added this to the 8.3 milestone Mar 7, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make code trim safe
5 participants