Skip to content
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

Create LSIF dumps by querying arbitrary language servers #134

Closed
vberlier opened this issue Nov 6, 2021 · 3 comments
Closed

Create LSIF dumps by querying arbitrary language servers #134

vberlier opened this issue Nov 6, 2021 · 3 comments
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities

Comments

@vberlier
Copy link

vberlier commented Nov 6, 2021

All the LSIF implementations I came across are tightly coupled to a specific underlying tool. I was wondering if it would be possible to create LSIF dumps by going through the language server protocol. The idea is that the you would be able to plug any existing language server and the LSIF utility would act as a client and progressively crawl the entire codebase. I understand it would probably be a lot less efficient than current implementations like lsif-tsc but it would open up LSIF to a lot of languages for free. I think a language agnostic LSIF utility would be very useful. I want to know if it's something that has already been considered, or if it already exists and I just missed it somehow.

@dbaeumer
Copy link
Member

dbaeumer commented Nov 8, 2021

We tried this and it is extremally slow for find all references.

@dbaeumer dbaeumer added feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities labels Nov 8, 2021
@dbaeumer dbaeumer added this to the Backlog milestone Nov 8, 2021
@vberlier
Copy link
Author

I see. My motivation for this would be using LSIF as a source of truth for a generic utility that can display hover information on code examples, similar to what twoslash currently does for typescript. I started investigating how I could do this for Python in a discussion on the Pyright repo, and it looks like the sourcegraph team will revisit https://github.com/sourcegraph/lsif-py at some point and make it work with Pyright (it only works with Jedi currently). This should cover my most immediate use-case but I'd still be interested in a generic language server crawler/scrapper. Even if it's slow it would make LSIF instantly available to dozens of languages, and depending on the use-case (e.g.: running it once when building docs) it would probably be fine for a lot of projects. If something like lsif crawl --stdout pyright-langserver -- --stdio isn't completely off the table I could look into it next week.

@dbaeumer
Copy link
Member

dbaeumer commented Dec 7, 2023

The feature has not gain any traction in the community. I therefore close the issue. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@dbaeumer dbaeumer closed this as completed Dec 7, 2023
@dbaeumer dbaeumer removed this from the Backlog milestone Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

2 participants