Skip to content

Ensure language server is not blocked on discovery in the first session #18671

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

Closed
karrtikr opened this issue Mar 10, 2022 · 11 comments
Closed

Ensure language server is not blocked on discovery in the first session #18671

karrtikr opened this issue Mar 10, 2022 · 11 comments
Assignees
Labels
area-environments Features relating to handling interpreter environments area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster needs proposal Need to make some design decisions verified Verification succeeded
Milestone

Comments

@karrtikr
Copy link

karrtikr commented Mar 10, 2022

If discovery takes a long time (#18200), it seems language server is not started until it has finished, even though it is not "blocked" on discovery NodeJS-wise. This prevents users from using the most basic features like the indexer, so they can't click through functions, variable definitions, etc.

In #18200 the user is blocked for about 15 mins, files are also on a shared network drive.

As language server activations takes less time, I think we can afford to postpone triggering discovery until after it has started. FYI @kimadeline as you're working on the new design to activate/deactivate language servers 🙂

cc/ @karthiknadig

@karrtikr karrtikr added feature-request Request for new features or functionality area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. area-environments Features relating to handling interpreter environments needs spike Label for issues that need investigation before they can be worked on. bug Issue identified by VS Code Team member as probable bug reason-preexisting and removed feature-request Request for new features or functionality labels Mar 10, 2022
@karrtikr karrtikr added needs proposal Need to make some design decisions and removed needs spike Label for issues that need investigation before they can be worked on. labels Mar 11, 2022
@wubdub
Copy link

wubdub commented Apr 15, 2022

Friendly ping on when this might be slated for development? My team of 200 hits this every morning and at lunch when we come back to our IDEs

@karrtikr karrtikr self-assigned this Apr 16, 2022
@karrtikr
Copy link
Author

Unfortunately we haven't been able to prioritize it yet partly as it didn't get enough upvotes. Does the VSIXs provided in #18200 serve as a workaround?

@karrtikr karrtikr removed their assignment Apr 16, 2022
@wubdub
Copy link

wubdub commented Apr 19, 2022

Thanks @karrtikr, I can use the VSIX but I think it gets wiped every time I update the extension. If this post receives enough upvotes would it be prioritized?

@karrtikr
Copy link
Author

It'll have much more chances of being prioritized yes.

I can use the VSIX but I think it gets wiped every time I update the extension

You can follow https://stackoverflow.com/a/63831525/8152786 to stop auto-updates for the Python extension.

@wubdub
Copy link

wubdub commented May 10, 2022

It'll have much more chances of being prioritized yes.
@karrtikr any chance this has enough votes to be prioritized now?

@karrtikr
Copy link
Author

#18647 received enough upvotes as well and could work for you.

@karrtikr
Copy link
Author

karrtikr commented May 13, 2022

@wubdub #19102 now ensures auto discovery only happens in the first session and turns it off for subsequent sessions (given Jupyter is not installed). Try the latest pre-release, activate the extension, auto-discovery should no longer happen:

image

Let me know if that unblocks you.

@karrtikr karrtikr added the info-needed Issue requires more information from poster label May 18, 2022
@karrtikr karrtikr changed the title Ensure language server is not blocked on discovery Ensure language server is not blocked on discovery in the first session Jun 3, 2022
@karrtikr
Copy link
Author

karrtikr commented Jun 3, 2022

This is now only a problem the first time a scope is opened, so could be an issue for the 1d users.

@wubdub
Copy link

wubdub commented Jun 21, 2022

@wubdub #19102 now ensures auto discovery only happens in the first session and turns it off for subsequent sessions (given Jupyter is not installed). Try the latest pre-release, activate the extension, auto-discovery should no longer happen:

image

Let me know if that unblocks you.

Sorry for the delay in getting back to you. Running v2022.9.11681004, I still have the same problem as I originally reported, the "Discovering Python Interpreters" with a spinning icon runs and during this time no language features are available (such as click to go to definition or syntax highlighting). Like before, the output terminal has logs like > /XXX/shared/conda-envs/XXX-9f9d08bc8-990/bin/python ~/.vscode-server/extensions/ms-python.python-2022.9.11681004/pythonFiles/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2022.9.11681004/pythonFiles/interpreterInfo.py and spins for 10+ mins. This is looking at one file that previously was indexed the last time VSCode was open

@karrtikr
Copy link
Author

Do you have Jupyter extension installed? Note that still needs to be disabled.

@wubdub
Copy link

wubdub commented Jun 22, 2022

Do you have Jupyter extension installed? Note that still needs to be disabled.

Ah! Amazing I disabled Jupyter extension and now it is instant, thanks!

@karrtikr karrtikr self-assigned this Jul 28, 2022
@karrtikr karrtikr added the verified Verification succeeded label Jul 28, 2022
@karrtikr karrtikr added this to the July 2022 milestone Jul 28, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster needs proposal Need to make some design decisions verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants