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

[6.0.2] Add [DynamicDependency] on System.Math for trimming #27098

Merged
merged 1 commit into from
Jan 6, 2022
Merged
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
5 changes: 5 additions & 0 deletions src/EFCore.Relational/Query/IMethodCallTranslator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq.Expressions;
using System.Reflection;
using Microsoft.EntityFrameworkCore.Diagnostics;
Expand All @@ -28,6 +30,9 @@ public interface IMethodCallTranslator
/// <param name="arguments">SQL representations of <see cref="MethodCallExpression.Arguments" />.</param>
/// <param name="logger">The query logger to use.</param>
/// <returns>A SQL translation of the <see cref="MethodCallExpression" />.</returns>
// This is a 6.0.x hack to make trimming work, since the linker doesn't see our GetRequiredRuntimeMethod invocations below
// (see #26288)
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(Math))]
SqlExpression? Translate(
SqlExpression? instance,
MethodInfo method,
Expand Down