I posted Dossier on the Rust subreddit, and user grunzl very helpfully pointed out that we could consider using https://github.com/github/stack-graphs and its tree-sitter integration for name resolution instead of rolling our own.
In short, stack graphs create a graph of symbols and their scopes, which you can then probe to resolve names to their definitions (aka "jump to definition"). You have to write a similar DSL to tree sitter queries to describe the rules for each language, and you can then use stack graphs to resolve names even across imports.
This is the technology that apparently powers GitHub's code navigation.
Definitely worth exploring, since relying on existing research/tooling in this area would be much preferred to rolling our own.
I posted Dossier on the Rust subreddit, and user grunzl very helpfully pointed out that we could consider using https://github.com/github/stack-graphs and its tree-sitter integration for name resolution instead of rolling our own.
In short, stack graphs create a graph of symbols and their scopes, which you can then probe to resolve names to their definitions (aka "jump to definition"). You have to write a similar DSL to tree sitter queries to describe the rules for each language, and you can then use stack graphs to resolve names even across imports.
This is the technology that apparently powers GitHub's code navigation.
Definitely worth exploring, since relying on existing research/tooling in this area would be much preferred to rolling our own.