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

Update trimming justifications #1415

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Polly.Core/Telemetry/ResilienceStrategyTelemetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ internal ResilienceStrategyTelemetry(ResilienceTelemetrySource source, Diagnosti
[UnconditionalSuppressMessage(
"Trimming",
"IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code",
Justification = "The reflection is not used when consuming the event.")]
Justification = "Reflection is not used when consuming the event.")]
[UnconditionalSuppressMessage(
"AOT",
"IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.",
Justification = "The reflection is not used when consuming the event.")]
Justification = "Reflection is not used when consuming the event.")]
public void Report<TArgs>(ResilienceEvent resilienceEvent, ResilienceContext context, TArgs args)
{
Guard.NotNull(context);
Expand Down Expand Up @@ -69,11 +69,11 @@ public void Report<TArgs>(ResilienceEvent resilienceEvent, ResilienceContext con
[UnconditionalSuppressMessage(
"Trimming",
"IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code",
Justification = "The reflection is not used when consuming the event.")]
Justification = "Reflection is not used when consuming the event.")]
[UnconditionalSuppressMessage(
"AOT",
"IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.",
Justification = "The reflection is not used when consuming the event.")]
Justification = "Reflection is not used when consuming the event.")]
public void Report<TArgs, TResult>(ResilienceEvent resilienceEvent, OutcomeArguments<TResult, TArgs> args)
{
args.Context.AddResilienceEvent(resilienceEvent);
Expand Down
2 changes: 1 addition & 1 deletion src/Polly.Core/Utils/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ internal static class Constants
{
public const string OptionsValidation = """
This call validates the options using the data annotations attributes.
Make sure that the options are included using the '[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(OptionsType))]' attribute on top of calling method.
Make sure that the options are included by adding the '[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(OptionsType))]' attribute to the calling method.
""";
}
2 changes: 1 addition & 1 deletion src/Polly.Core/Utils/ValidationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal static class ValidationHelper
[UnconditionalSuppressMessage(
"Trimming",
"IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code",
Justification = "The member of options are preserved and no trimmed. See builder.AddStrategy() extension.")]
Justification = "The member of options are preserved and not trimmed. See builder.AddStrategy() extension.")]
public static void ValidateObject(ResilienceValidationContext context)
{
Guard.NotNull(context);
Expand Down