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

When trimming, queries fail because of missing System.Math #27097

Closed
roji opened this issue Jan 3, 2022 · 0 comments · Fixed by #27098
Closed

When trimming, queries fail because of missing System.Math #27097

roji opened this issue Jan 3, 2022 · 0 comments · Fixed by #27098
Assignees
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported regression Servicing-approved type-bug
Milestone

Comments

@roji
Copy link
Member

roji commented Jan 3, 2022

Since we use our GetRequiredRuntimeMethod wrapper method, the linker cannot see our dependency on on Math (e.g. in SqlServerMathTranslator); this is a regression from EF Core 5.0, where at least basic query usage does work with .NET SDK 6.0.

The proper fix for this in 7.0 is to stop using GetRequiredRuntimeMethod (tracked by #26288), but for 6.0 we can do a simpler, less risky change that would make the dependency known to the linker. Other scenarios may very well fail since EF Core 6.0 isn't trimming-ready.

Reported e.g. in npgsql/efcore.pg#2185

@roji roji self-assigned this Jan 3, 2022
roji added a commit to roji/efcore that referenced this issue Jan 3, 2022
@roji roji changed the title When trimming, all queries fail because of missing System.Math When trimming, queries fail because of missing System.Math Jan 3, 2022
@ajcvickers ajcvickers added this to the 6.0.2 milestone Jan 6, 2022
@ajcvickers ajcvickers added Servicing-approved closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. labels Jan 6, 2022
@roji roji linked a pull request Jan 6, 2022 that will close this issue
@roji roji closed this as completed Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported regression Servicing-approved type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants