Skip to content

Indexing doesn't appear to be working on Windows #722

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
adam-fowler opened this issue Mar 21, 2023 · 6 comments
Closed

Indexing doesn't appear to be working on Windows #722

adam-fowler opened this issue Mar 21, 2023 · 6 comments

Comments

@adam-fowler
Copy link
Contributor

This bug has been triggered by the following bug in the vscode-swift repo swiftlang/vscode-swift#479.

In most cases sourcekit-lsp returns no results when asking to jump to definition for a symbol outside the current file.
The only situation I can get it to return a result is run swift package clean and then a swift build. As soon as I restart VSCode though it stops working again.

@ahoppen
Copy link
Member

ahoppen commented Mar 21, 2023

rdar://106995873

@ahoppen
Copy link
Member

ahoppen commented Mar 23, 2023

@compnerd Do you have an idea what might be going wrong here?

@compnerd
Copy link
Member

@ahoppen completely wild guess, when we restart, we are passing a path somewhere, and the path is not being formed using the proper path component separator, i.e. / is being used somewhere rather than \.

@adam-fowler
Copy link
Contributor Author

adam-fowler commented Mar 23, 2023

@ahoppen completely wild guess, when we restart, we are passing a path somewhere, and the path is not being formed using the proper path component separator, i.e. / is being used somewhere rather than \.

I had a quick check to see if vscode is passing / instead of \ and it doesn't look like it does. Most of the paths sent are URIs anyway which will use /. There is only one raw path (rootPath in the initialise) and that uses \.

@compnerd
Copy link
Member

For some reason, I seem to remember something along the lines of the path separator being an issue because it mismatched between SPM and LSP. This resulted in the files being treated differently, which was rather annoying.

@adam-fowler
Copy link
Contributor Author

I have this working now, the situations where I haven't are probably related to #752

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

No branches or pull requests

3 participants