Python language support via extension
Created by: sqs
Sourcegraph currently supports for Python hovers, go-to-definition, find-references, and find-implementations using sourcegraph/python-langserver. This has worked so far to provide those features, but we want to be able to provide code intelligence features and configuration on par with editors, such as better dependency support and a smoother configuration experience. To do this, we are moving all language support (including Python) to being built as Sourcegraph extensions. The initial milestone is to get the current feature set ported to an extension (minus dependency installation + cross-repository definitions/references). This is part of the larger initiative of improving language support in 2019: https://github.com/sourcegraph/sourcegraph/issues/1551
Demo video: https://drive.google.com/open?id=1ZU5LKNGeFYkPmeuG1yFMloB65dEfuMzz
- Language server: https://github.com/Microsoft/python-language-server
- WIP fork: https://github.com/sourcegraph/python-language-server/tree/wip2
- WIP extension
For switching to the Python extension on Sourcegraph.com:
-
Ensure that it is cleaning up temp dirs https://sourcegraph.slack.com/archives/C07KZF47K/p1546987357093200?thread_ts=1546986638.092300&cid=C07KZF47K
For 3.0:
-
Make a test plan -
Add WebSocket support https://github.com/Microsoft/python-language-server/commit/79faae45a77e702d46af8068ff2724a39a8c28f1 -
Add zip archive fetching support https://github.com/Microsoft/python-language-server/commit/79faae45a77e702d46af8068ff2724a39a8c28f1 -
Add support for private Sourcegraph instances (using an access token) -
Add deploy config (with TLS via ingress) to our infrastructure repo (waiting for https://github.com/sourcegraph/sourcegraph/issues/1682) -
Add deployment instructions -
Document build steps
Scoped for 3.1 (not in scope for 3.0)
- Dependency fetching
- Cross repository code intel
- Upstream the changes to https://github.com/Microsoft/python-language-server