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

Better management of negated expressions #31028

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

roji
Copy link
Member

@roji roji commented Jun 4, 2023

Note that this PR is based on top of #30976 (review only the last commit)

Closes #31027

@roji roji requested a review from maumar June 4, 2023 11:16
@roji roji changed the title Translate to IN + subquery when possible instead of EXISTS Better management of negated expressions Jun 4, 2023
@roji roji force-pushed the NoMoreNegatedExpressions branch from af35cdc to 68deb19 Compare June 4, 2023 11:58
@@ -875,7 +875,7 @@ where type.IsVisible
from method in type.GetMethods(AnyInstance)
where method.DeclaringType == type
&& !Fixture.NonVirtualMethods.Contains(method)
&& (!method.IsVirtual || method.IsFinal)
&& !method.IsVirtual
Copy link
Member Author

@roji roji Jun 4, 2023

Choose a reason for hiding this comment

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

@AndriySvyryd note this change which allows marking methods as sealed... This is to allow https://github.com/dotnet/efcore/pull/31028/files#diff-13f563541479291311be1ed3fba340a2d34cd0a187b7c6fb03b79b4c4db93b74R719, where I want to prevent people from accidentally overriding the wrong thing. This feels OK as it's a very explicit gesture (unlike forgetting to mark a method with virtual), I can already add it to the NonVirtualMethods set (but why force me to do this "twice"), and we also allow sealed types above.

@roji roji force-pushed the NoMoreNegatedExpressions branch from 68deb19 to 8fdba79 Compare June 4, 2023 22:13
@maumar
Copy link
Contributor

maumar commented Jun 5, 2023

changes look good - ok to check-in provided @AndriySvyryd signs off on the protected sealed thing and once the api consistency test is changed accordingly

@roji roji force-pushed the NoMoreNegatedExpressions branch 2 times, most recently from a4312cb to 4749606 Compare June 5, 2023 09:31
@roji roji force-pushed the NoMoreNegatedExpressions branch from 4749606 to 8b8af81 Compare June 5, 2023 09:41
@roji roji merged commit 53834d4 into dotnet:main Jun 5, 2023
@roji roji deleted the NoMoreNegatedExpressions branch June 5, 2023 23:44
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.

Better management of negated expressions
3 participants