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

Enable AOT compatibility for Yarp.Telemetry.Consumption #2146

Merged
merged 2 commits into from
May 24, 2023

Conversation

eerhardt
Copy link
Member

Also fix a simple warning in Yarp.Kubernetes.Controller. The rest of the warnings in this project will be addressed in #2145.

Follow up to #2144 (comment)

Also fix a simple warning in Yarp.Kubernetes.Controller. The rest of the warnings in this project will be addressed in microsoft#2145.
Copy link
Member

@MihaZupan MihaZupan left a comment

Choose a reason for hiding this comment

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

How come something like

public static IServiceCollection AddTelemetryConsumer<TConsumer>(this IServiceCollection services)

does not raise a warning, but something like
public static IReverseProxyBuilder AddTransforms<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T>(this IReverseProxyBuilder builder) where T : class, ITransformProvider

does?

@eerhardt
Copy link
Member Author

Oh wow, nice catch! This is a bug in the analyzer. dotnet/roslyn#68420.

I've fixed the warning and ensured when I publish an app rooting both Yarp assemblies there aren't any warnings from the trimming tool (which is separate from the Roslyn analyzer).

@MihaZupan
Copy link
Member

Thanks!

@MihaZupan MihaZupan enabled auto-merge (squash) May 24, 2023 18:57
@MihaZupan MihaZupan merged commit b9ee824 into microsoft:main May 24, 2023
@eerhardt eerhardt deleted the AotConsumption branch May 24, 2023 19:23
@MihaZupan MihaZupan added this to the YARP 2.x milestone May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants