Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upRust code intelligence #7
Comments
beyang
added
feature-request
and removed
feature-request
labels
Jun 26, 2017
beyang
changed the title
Rust support
Rust code intelligence
Jan 26, 2018
This comment has been minimized.
This comment has been minimized.
|
Experimental Rust support has been shipped in Sourcegraph 2.8! Check out the blog post https://about.sourcegraph.com/blog/code-intelligence-for-more-languages-and-lsp-language-server-protocol-support Thanks go to the rust-lang-nursery/rls project for providing the language server. |
sqs
added this to the
December 2018 milestone
Oct 25, 2018
This comment has been minimized.
This comment has been minimized.
|
Better Rust support is planned for December 2018. https://docs.sourcegraph.com/dev/roadmap#december-2018 |
sqs
added
the
feature:code-intel
label
Oct 25, 2018
sqs
added
roadmap
and removed
roadmap
labels
Nov 13, 2018
nicksnyder
modified the milestones:
3.0-preview.2,
3.0,
Backlog
Dec 14, 2018
sqs
assigned
chrismwendt
Dec 20, 2018
This comment has been minimized.
This comment has been minimized.
|
We've since removed Rust support and don't have immediate plans to bring it back. There are two potential paths forward:
Neither of these are particularly appealing since Sourcegraph is sensitive to initialization time (because analysis is performed on the fly) and we'd like to improve code intelligence on a time scale on the order of months. |
This comment has been minimized.
This comment has been minimized.
spacejam
commented
Jan 24, 2019
•
|
@chrismwendt rust-analyzer supports definition and reference look-up today, are there other bits of functionality that are important for sourcegraph that are currently missing? I'm having trouble pinpointing the sourcegraph code that formerly interacted with RLS in the public repos. @matklad can shed light on the relative stability for specific APIs that you would like to use, but I believe that "years out" may not be accurate for stable implementations of sourcegraph's requirements. sourcegraph is a cool tool and it would be a shame for the growing rust community to lose support :) |
This comment has been minimized.
This comment has been minimized.
matklad
commented
Jan 24, 2019
|
"couple of years" might be a good estimate for 100% coverage of the Rust language, but some part of those 100% is already working today. For example, goto defenition for imports pretty much just works. So, if partial support of the Rust language is interesting, rust-analzyer can provide that.
The "as a library API" is totally unstable, but we can ship a statically linked binary which talks LSP, and that is of course stable. |
This comment has been minimized.
This comment has been minimized.
LandKingdom
commented
Jan 24, 2019
|
I personally wouldn't mind waiting some time before being able to use the tool. |
This comment has been minimized.
This comment has been minimized.
|
@spacejam The 3 main bits of functionality are hover tooltips, definitions, and references. It sounds like rust-analyzer would work pretty well since it already has support for 2 of those 3. Now that code intelligence on Sourcegraph is provided by Sourcegraph extensions, anyone can build a Rust extension with the same functionality as other language extensions like Go, TypeScript, and Python. Since Sourcegraph extensions are JavaScript bundles that run in the browser, they are constrained to communicate with a remote language server over HTTP or WebSockets. To satisfy this constraint, we've added WebSocket and zip archive fetching (to get the repository contents on disk) to the Go, TypeScript, and Python language servers. Rust would probably need similar functionality, but what's nice is that the extensions are free to choose how to do that - Sourcegraph does not mandate any particular transport or protocol be used. |

beyang commentedJun 26, 2017
Support Rust on Sourcegraph.