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

missing dependant sourcekite tool, please configure correct "swift.path.sourcekite" #37

Closed mtancock closed 5 years ago

mtancock commented 5 years ago

I have the same issue as #7 but mine doesn't seem to be resolved using the same steps.

I've installed the extension.

I've built sourckite which is located at /Users/user/xcode/sourcekite

I've added "swift.path.sourcekite": "/Users/user/xcode/dev/sourcekite/.build/debug/sourcekite" to my settings.json in VSCode

I've reloaded / disabled/re-enabled / restarted VSCode

And I get the above error along with:

Error: spawn /Users/user/xcode/dev/sourcekite/.build/debug/sourcekite ENOENT at _errnoException (util.js:1024:11) at Process.__dirname.ChildProcess._handle.onexit (internal/child_process.js:190:19) at onErrorNT (internal/child_process.js:372:16) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)

and:

The Swift server crashed 5 times in the last 3 minutes. The server will not be restarted.

Any ideas?

vknabel commented 5 years ago

Thanks for trying this out!

I've built sourckite which is located at /Users/user/xcode/sourcekite

I've added "swift.path.sourcekite": "/Users/user/xcode/dev/sourcekite/.build/debug/sourcekite" to my settings.json in VSCode

It seems like you placed sourcekite directly into your xcode-folder instead of xcode/dev as you configured within your settings. Or did this error happen when anonymizing the path?

mtancock commented 5 years ago

Ugh. No you're right. I mangled the path. This should teach me to work on this kind of thing late at night.

I'm now having trouble getting code completion working, but I'm still investigating that one. Will open another issue if necessary!

vknabel commented 5 years ago

No problem! This happens to everyone.

You are always welcome to open an issue, even for questions!

Are you working on an Xcode project? In that case you would need to manually provide autocompletion options (see here). If it is a SwiftPM project, it should usually work out of the box.