vknabel / vscode-swift-development-environment

New home of Swift Development Environment for VS Code
https://marketplace.visualstudio.com/items?itemName=vknabel.vscode-swift-development-environment
Apache License 2.0
175 stars 14 forks source link

Indefinitely loading instead of suggestions #112

Closed vknabel closed 2 years ago

vknabel commented 2 years ago

Hey, @vknabel, looks like SDE 2.12.2 has no issues with starting up and running, so the bug appears to be fixed! I am seeing a problem with hover help getting stuck (at "Loading...") with SDE whereas they work with the plain sourcekit-LSP and extension, but that may well be an operator error (configuration problem). Unless you want to track that here, I suggest closing and I'll continue working on that separately...

from https://github.com/vknabel/vscode-swift-development-environment/issues/111#issuecomment-950237972 by @fphartnc

fphartnc commented 2 years ago

I made the mistake of "updating" VSCodium from version 1.60.2 to version 1.61.2 and now SDE/sourcekite does not even show the "Loading..." hover indicator and the Sourcekit-LSP isn't working, either. [Not relevant to SDE/sourcekite, but FYI for others who might be interested: The message I get from Sourcekit-LSP is: "Couldn't start client SourceKit Language Server" ... This is a message for which a web search produces very little in the way of feedback, and most of it in the Japanese language, in which I am a bit rusty...] I am considering uninstalling VSCodium 1.61.2 completely (I installed it the "proper" way using the .deb form and dpkg) and then re-installing version 1.60.2 and then I'll see if I can recreate the situation described above. If I can get things to work as well as before the 'upgrade' then I'll stick with them for awhile.

fphartnc commented 2 years ago

Update: I now have uninstalled version 1.61.2 and done a fresh installation of version 1.60.2, and I seem to be back to where I was at the time this issue was opened: Sourcekit-LSP seems to work just fine on my standalone swift file, showing hover hints. But SDE/sourcekite shows "Loading..." One other thing I can report: Down in the lower left status area, I am seeing a message that says "building" alongside a progress indicator (of a sort I haven't seen in the past). Question: Is there a possibility that SDE/sourcekite is being blocked until the "build" takes place? Note here that I do not have a swift "build" task defined yet... I will get to doing that in the next day or so, but other scheduled weekend activities will put this on hold...

vknabel commented 2 years ago

Thanks for the updates! I won't have access to a laptop for about a week, but I'd be happy to help.

SDE works best for Swift Package Manager projects. In those cases it should work relatively well for Linux and macOS projects. iOS, Tensorflow for Swift and others require some additional setup.

SDE will now automatically build your SwiftPM targets. That creates an index of your source code and typings for sourcekite and sourcekit-lsp. After that successful build, intelli sense should work fine.

The building indicates this process. If there are compile errors it show something like failed.