7 ms·
Just out of curiosity, what's the timeline look like for adding precise code navigation to other supported languages and what languages do you think will get su
by ZeroCool2u 5y ago
Just out of curiosity, what's the timeline look like for adding precise code navigation to other supported languages and what languages do you think will get support first?
No need for precise answers, just wondering which ones we're likely to see next after Python :)
Also, I'm looking at the list of supported languages here[1]. Maybe you're not the right person to ask, but are there any plans to add support for one of the lower level / systems programming languages like C, C++, or Rust, etc?
Finally, thank you so much for you and your teams hard work. This feature is _incredibly_ helpful, especially in Python!
[1]: https://docs.github.com/en/repositories/working-with-files/using-files/navigating-code-on-github#about-navigating-code-on-github https://docs.github.com/en/repositories/working-with-files/u...
- dcreager 5y agoIt's not “easy”, but we've found that because it's based on a declarative DSL it's less effort than you might expect. And we're finding that there are common patterns that you use in your graph construction rules, because there are many aspects of name binding that end up working the same way in different languages. So, hand-wavily (not out of secrecy but because of not having rigorous data yet), we're finding that it's O(months) to get a new language out the door. We do have a couple of other languages in the pipeline that my team has been working on, both in terms of writing stack graph rules to get precise support, and also to write "fuzzy" tagging rules to get search-based support. And we definitely do plan to include lower level languages like the ones you mentioned. Lastly, one major reason that we're doing all of this in open-source projects is that we want to ensure that language communities can self-serve support for their languages, should they wish to. That will be especially useful for the long tail of languages that my team will honestly never be able to get to ourselves. We have some work to do to get the documentation written to properly support self-serve stack graph rules, but it's definitely a goal that we're aiming for.
- ZeroCool2u 5y agoGot it, that's really helpful in terms of estimating the work involved. Thanks for taking the time to answer all these questions and congrats again on the release!
- sterlinm 5y agoAre there any publicly available examples of what it actually looks like to implement this for a given language? Is that somewhere in the linked rust crate? It seems very cool but I'm having some trouble imagining what the actual implementation for a given language would look like. Thanks!
- dcreager 5y agoUnfortunately not yet — we have working stack rules for Python, but they use an older internal version of the graph DSL. We’re actively working on porting it to the open source tree-sitter-graph DSL and adding it to the public tree-sitter-python grammar repo. But it’s not there yet.