-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Throw better exception message for client eval #17247
Throw better exception message for client eval #17247
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There seem to be some cases where tests for something that is currently untranslatable have been changed to assert on translation failure - it seems better to keep them skipped (and ideally reference an issue).
src/EFCore.Cosmos/Query/Internal/CosmosProjectionBindingExpressionVisitor.cs
Show resolved
Hide resolved
src/EFCore.Cosmos/Query/Internal/CosmosQueryableMethodTranslatingExpressionVisitor.cs
Show resolved
Hide resolved
src/EFCore.Relational/Query/RelationalSqlTranslatingExpressionVisitor.cs
Show resolved
Hide resolved
test/EFCore.Relational.Specification.Tests/Query/QueryNoClientEvalTestBase.cs
Show resolved
Hide resolved
RemoveNewLines( | ||
Assert.Throws<InvalidOperationException>( | ||
() => context.Orders | ||
.Where(o => o.OrderID > new Random().Next()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be translated? Also other random-exercising tests below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not possible to translate for all providers. We should revisit in future, how do we provide tests which are totally conditionally in provider. No suitable relational available. (or throwing can be relational translation)
In reply to: 315191515 [](ancestors = 315191515)
@@ -3496,86 +3496,48 @@ public class Configuration9468 | |||
|
|||
#region Bug10635 | |||
|
|||
[ConditionalFact(Skip = "issue #14935")] | |||
[ConditionalFact] | |||
public void Include_with_order_by_on_interface_key() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be translatable (in the future)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translatable. I think @ajcvickers is already working on issue.
In reply to: 315192777 [](ancestors = 315192777)
|
Unable to process |
Going to merge this now, then work on the feedback in a separate PR. |
f53e234
to
b6614de
Compare
b6614de
to
76bd379
Compare
@smitpatel @divega Messages for the two general cases:
With two different fwlinks? Thoughts? |
Also include visitor name in 2nd exception message. LGTM otherwise. |
.Where(o => o.OrderID > new Random().Next(0, 10)) | ||
.ToList(); | ||
Assert.Equal( | ||
CoreStrings.TranslationFailed("(o) => o.OrderID > new Random().Next( minValue: 0, maxValue: 10)"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to improve this printing. cc: @maumar
@roji - I commented on all the why not translated comments. If you see any other test which you think we should translate then, please file an issue with the test name and what should be the translation. |
The new fwlink for the "processing the linq expression failed" case is https://go.microsoft.com/fwlink/?linkid=2101433. |
@smitpatel realistically we should probably just do a pass later and search for translation failure assertions in tests, I don't think there's anything urgent in there for 3.0 (at least not that I can tell). |
Nothing urgent. I meant to say whenever you decide to do pass or see something out of place. That is true even without regards of client eval changes. |
Fixes #16133 and also partial fix for #15937
This is far from perfect and needs some further work. For example, see #17236
No issues reference #14935 any more; new issues cover things not fixed here but which were refeceing that issue.