Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

Go to symbol not available for some symbols until I open the file that contains them #556

Closed
ericbiewener opened this issue Jan 26, 2019 · 6 comments

Comments

@ericbiewener
Copy link

It seems like not all the symbols get indexed, regardless of whether the initial language server analysis has completed. But once I open the file that contains the symbol I'm looking for, that symbol thereafter is available.

@jakebailey
Copy link
Member

What version of the language server are you on? Can you provide an example workspace/repo we could test on? Is the file not being indexed in an excluded path, like a virtual environment?

#521, new in v0.1.77+, changes the way symbols are indexed. All symbols should be available immediately after the language server has parsed the workspace, which is soon after it starts (and can be much earlier than the analysis takes to complete).

@ericbiewener
Copy link
Author

I'm on VS Code 1.30.2 and Microsoft Python Language Server version 0.1.72.0.

I'm not able to recreate it with an example workspace/repo because I don't know what conditions are required to make it happen. I have a multiroot workspace, but hard to identify anything else unique about it.

@MikhailArkhipov
Copy link

0.1.78 has new indexer and will be available shortly. It is in beta channel at the moment if you are willing to try.

@ericbiewener
Copy link
Author

Gave it a shot, but I get the same behavior. In fact, I've been able to identify now that symbols are exclusively getting indexed when the file containing them first gets opened. This is the case in both versions of VS Code.

However, a single root workspace appears to work fine. My multiroot workspace is our main repo and along with a personal "scratchpad" directory. Opening the main repo directly as a single root workspace causes all symbols to get indexed correctly.

@DonJayamanne
Copy link

Multi root support for the language server has not yet been implemented. It is being tracked here microsoft/vscode-python#3008

@ericbiewener
Copy link
Author

That would explain it :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants