-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Python extension is showing "Pylance is not installed" notification too soon #16614
Comments
It seems like the current state is much, much worse than before. Now Pylance isn't even available to be activated so the Python extension can use it. I am very surprised that it's letting extensions activate during installs of the dependency chains, but I suppose that the directions currently (to VS Code's eyes) are "Python soft requires Pylance" and "Pylance hard requires Python", where installing the Python extension first is the way to do it. But, we want them both to be activated together as one unit, just distributed separately. I'd wonder if we should have just dropped the hard dep from Pylance to Python, but if VS Code is now activating Python before any of its extension pack / optional deps are installed, then there's not much we can do to fix this and we're going to regress majorly. This later check is "fixable" with a sleep to maybe wait for the install to complete, but the check that makes "Default" be Pylance is much earlier, and we'd have to somehow block the Python extension activation until Pylance has been installed. Except for both cases, we can't know that it is currently being installed from the APIs (maybe it's not even being installed at all because it was explicitly uninstalled!). |
Any idea when the next VS Code release is datewise so we can go verify that this is definitely broken? |
The next VS Code Stable release should be this Thursday. |
FWIW this is our main install flow for all Python users, so any new user is going to start seeing these in the next VS Code update, hence me asking for timing. |
Fixed upstream by microsoft/vscode#128088. |
Environment data
python.languageServer
setting: Pylance[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (
python.languageServer: 'Microsoft'
), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]We used to have a race condition when installing the Python extension that caused multiple notifications to show up with "Cannot install X because it depends on the Python extension and its not installed". That was fixed with a reload, but the UX isn't great. VS Code fixed the problem (microsoft/vscode#124870), so now it's showing on our end (with many more notifications if you open it in Codespaces using VS Code insiders 😅)
The problem seems to be that we activate while Pylance is still installing, so we show the notification that it's not installed. Once it finishes installing, we ask users to reload it. Not sure what would be the best way to handle this case but we could wait a bit before we show that Pylance is not installed yet?
cc @jakebailey @savannahostrowski
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
I can reproduce it every time that I create a new codespace using a Python repo and open a Python file to activate the Python extension. But it should also be reproduceable if you set "Pylance" in the user setting scope, uninstall the Python, Jupyter and Pylance extensions, reload the window, install the Python extension and activate it by opening a Python file.
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Log (Remote Extension host)
The text was updated successfully, but these errors were encountered: