-
-
Notifications
You must be signed in to change notification settings - Fork 432
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
fix(semantic): get_symbol_id_from_span not searching symbol redeclarations #6701
base: main
Are you sure you want to change the base?
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
CodSpeed Performance ReportMerging #6701 will not alter performanceComparing Summary
|
Are there any situations where we need to use this method? The method looks a little complicated and not very efficient. I have checked our codebase only three places used this method and it looks like we can replace them. To remove this method, we need to add |
Agreed. We generally consider it an anti-pattern to use @valeneiko Can I ask: what is your use case for |
@overlookmotel
I am doing it by iterating over symbol references, for each reference finding the ancestor declaration in root scope and resolving that declaration's AstNode into a Symbol.
For now the goal was to just explore what can be done with such a graph. @Dunqing as for the perf of this specific PR. I think it is fine, because symbol redeclarations are rare, so in reality that whole method will most of the time be an empty iterator and occasionally iterate over very few items. As for the |
Fixes #6689