Closed alexito4 closed 7 years ago
Ive seen some reports of this. What version and how did you install Swift?
The problem is that it can't find sourcekit.
Sent from my iPhone
On Jun 3, 2017, at 7:53 AM, Alejandro Martínez notifications@github.com wrote:
I just installed the extension and created a new Swift project with SPM. And just opening the main swift file makes VSC show a message at the top:
The Swift Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.
Checking the output of the Swift Language Server shows this:
dyld: Library not loaded: @rpath/sourcekitd.framework/Versions/A/sourcekitd Referenced from: /Users/alejandromartinez/.vscode/extensions/kiadstudios.apous-0.5.2/lib/usr/bin/langsrv Reason: image not found [Info - 3:49:08 PM] Connection to server got closed. Server will restart. dyld: Library not loaded: @rpath/sourcekitd.framework/Versions/A/sourcekitd Referenced from: /Users/alejandromartinez/.vscode/extensions/kiadstudios.apous-0.5.2/lib/usr/bin/langsrv Reason: image not found [Info - 3:49:08 PM] Connection to server got closed. Server will restart. dyld: Library not loaded: @rpath/sourcekitd.framework/Versions/A/sourcekitd Referenced from: /Users/alejandromartinez/.vscode/extensions/kiadstudios.apous-0.5.2/lib/usr/bin/langsrv Reason: image not found [Info - 3:49:08 PM] Connection to server got closed. Server will restart. dyld: Library not loaded: @rpath/sourcekitd.framework/Versions/A/sourcekitd Referenced from: /Users/alejandromartinez/.vscode/extensions/kiadstudios.apous-0.5.2/lib/usr/bin/langsrv Reason: image not found [Info - 3:49:08 PM] Connection to server got closed. Server will restart. dyld: Library not loaded: @rpath/sourcekitd.framework/Versions/A/sourcekitd Referenced from: /Users/alejandromartinez/.vscode/extensions/kiadstudios.apous-0.5.2/lib/usr/bin/langsrv Reason: image not found [Error - 3:49:08 PM] Connection to server got closed. Server will not be restarted. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
The one that comes with Xcode 8.3.2, installed from the App Store. I also have a couple of snapshots installed (via the mac installed) in case it may affect.
Yeah, sorry. I've been testing with the official toolchain versions instead. Downloading Xcode 8.3.2 now make sure it has everything I need.
Ok, I got it installed and verified that this is working for me. You can configure your toolchain path, as the README shows. You'll need to point that Xcode's location until I add logic to do lookups in multiple places.
So in your settings.json file for VS Code, add the following:
"swift.toolchainPath": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain"
Reload the window, and that should fix it. Sorry about the troubles.
This should be fixed in v0.5.3 now. No need for the setting changes.
I just installed the extension and created a new Swift project with SPM. And just opening the main swift file makes VSC show a message at the top:
Checking the output of the Swift Language Server shows this: