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
Use Symbol Tables for Completions #874
Use Symbol Tables for Completions #874
Conversation
// make sure validation is complete | ||
await this.validateAllThrottled(); | ||
//wait for the validation cycle to settle | ||
await this.onValidateSettled(); |
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.
This might have something to do with the issues with validations getting stuck. Just taking note...
if (await this.handleFileChange(project, change)) { | ||
await this.validateAllThrottled(); | ||
} |
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.
This might have something to do with the stuck validation cycle too. Just taking another note...
@@ -834,21 +834,25 @@ export class Scope { | |||
: new NamespaceType(nameSoFar); | |||
if (previousNSType) { | |||
// adding as a member of existing NS | |||
previousNSType.addMember(nsNamePart, namespace.range, currentNSType, getTypeOptions.flags); | |||
previousNSType.addMember(nsNamePart, { definingNode: namespace }, currentNSType, getTypeOptions.flags); |
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.
What was the need for the definingNode
property? I'm not a huge fan of linking AST to types, would be nice to find a way to avoid this if possible.
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.
This is fantastic! Thank you.
Changes all completion logic to use symbol tables.
Other changes:
- Hack to get a parser from an AST Body - this is used to get the documentations tokens. I don't like how this is done (AST Node should not know about the Parser! -> It would be really useful to have a way to map functions to comments!NOTE:
There has been a significant performance loss in
Validate
benchmark.. I think it happened in commit: 81e6391