-
Notifications
You must be signed in to change notification settings - Fork 81
Improve launch of python-based LSP server within IDEs #2184
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
Conversation
…n activated. This is a common situation when running from IDEs.
If nothing else, this includes our intent.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2184 +/- ##
==========================================
- Coverage 63.56% 63.52% -0.04%
==========================================
Files 100 100
Lines 8503 8508 +5
Branches 885 887 +2
==========================================
Hits 5405 5405
- Misses 2931 2934 +3
- Partials 167 169 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
✅ 51/51 passed, 10 flaky, 3m56s total Flaky tests:
Running from acceptance #3150 |
Specifically, we never consult PATH.
sundarshankar89
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
gueniai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Changes
This PR tweaks the way we launch python-based LSP launchers, mainly to help with developer workflows in the latest IntelliJ release. The issue here is that when running individual tests via the IDE, as of the latest release the (hatch-created) virtual environment is not activated: this causes many tests to run the stub LSP server against the system python, or fail because the system only provides
python3(and notpython).Relevant implementation details
The key change here is that if the LSP server is python-based but there's no dedicated
.venvfor it, the LSP server is now always launched with the current python interpreter.As a related minor improvement, we also raise an error earlier if the executable we're about to launch can't be found.
Tests