-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Feature request: IOperation support for queries #17838
Comments
cc/ @genlu |
LINQ was left out with the intention to support them in future, when we made the effort to release IOperation last year. We need to discuss again whether it should be in V1 or not. |
Note that not implementing this completely means that our current implementation makes no analyzer callbacks for anything inside a query - parameter/field/local references, invocations, etc. I don't think that is acceptable for any new language feature. We need to take one of the following approaches:
|
I am moving this back to 15.3 to discuss in the API review meeting. |
I have opened #18968 to track the work to add |
Design Meeting Decision For now lets unblock users with the workaround defined in #18968 . we need to come back and discuss about what the API for queries looks like. |
we need to collect a lot of information here so that we can then get together to discuss how we want this API to look like. We need to identify differences between the languages (for example VB is semantic and C# is syntactic). We need to enumerate all the different types of queries. We need to understand all the strange VB cases. We need to get info on transparent identifiers and the like. Basically, you needs to go read up a lot on these guys and collect a lot of info as we'll likely need a lot of design around this. |
Implements the proposal discussed in dotnet#17838 (comment). 1. We will have an `IQueryExpression` representing the topmost query expression. 2. This will point to the last query clause (`IQueryClause`) or continuation (`IQueryContinuation`) in the unrolled lowered bound tree - we are not got going to reverse the tree to match source. 3. `IQueryClause` will have a `QueryClauseKind` field indicating the type of query clause, which should match the syntax/language specification query clause/operator kinds.
See #21356 (comment) for discussion |
Design decisions: Figure out engineering way to "lower" the current VB query tree so that query lambdas are rewritten to regular lambdas. This will ensure that range variables are rewritten into lambda parameter access. C# and VB trees should look more similar. -- In future (potentially based on customer demand) we can supply a higher level Query API that more closely matches the original source (along with things like range variables and the like). |
Removing the Urgency-Now label and marking as 15.later - we have basic support for translated query expressions now, which matches our v1 scope. Keeping this issue open to track richer query APIs for v2. |
#28098 tracks exposing richer IOperation API for queries. This issue was closed as we do expose an |
Feeding the next code sample to an
OperationWalker
hits nothing. Please considerIOperation
support for queries.The text was updated successfully, but these errors were encountered: