Closed alexandru-calinoiu closed 6 years ago
@alexandru-calinoiu thanks for the feedback!
Did you upgrade to Swift 4.1 after initially installing sourcekite
? In that case you might have to recompile it.
Did the autocompletion completely stop after initially getting this error? Does a vscode restart help (at least temporarily and as a workaround)?
In case it is project related: is the project open source or can you reproduce your issue in a smaller project? It may help a lot if we could talk about an explicit code base.
I had a fresh install of swift 4, vs code restart does not work :(
The project is just the template of the perfect framework
Sorry for the late response. I did not find enough time to set up a VM. What happens if you do the following on your bash?
$ /path/to/your/sourcekite
1
{
key.request: source.request.protocol_version
}
Do you receive the following output? (You need to terminate it manually using ctrl+c
afterwards) If so sourcekite would be set up properly. The /path/to/your/sourcekite
should be included within your vscode settings as "swift.path.sourcekite": "/path/to/your/sourcekite"
.
{
key.version_major: 1,
key.version_minor: 0
}
If it still doesn't work: does your path contain any special characters like spaces?
I've updated to ubuntu 18.04 and I am not able to test this anymore because swift does not work there anymore.
I'm running on macOS, swift 4.1, compiled source kite with swift 4.1, updated to most recent version of MSDE (2.4.3).
Pointing at the debug build of sourcekite I am getting these errors:
/Users/daniel/.vscode/extensions/vknabel.vscode-swift-development-environment-2.4.3/out/src/server/sourcekites.js:88 throw new Error("wrong format for reqid"); ^
Error: wrong format for reqid
at SourcekiteResponseHandler.handleResponse (/Users/daniel/.vscode/extensions/vknabel.vscode-swift-development-environment-2.4.3/out/src/server/sourcekites.js:88:23)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at Pipe.onread (net.js:560:20)
[Info - 1:39:54 PM] Connection to server got closed. Server will restart.
[Error - 1:39:54 PM] Request textDocument/hover failed.
Error: Connection got disposed.
at Object.dispose (/Users/daniel/.vscode/extensions/vknabel.vscode-swift-development-environment-2.4.3/node_modules/vscode-jsonrpc/lib/main.js:825:25)
at Object.dispose (/Users/daniel/.vscode/extensions/vknabel.vscode-swift-development-environment-2.4.3/node_modules/vscode-languageclient/lib/client.js:57:35)
at LanguageClient.handleConnectionClosed (/Users/daniel/.vscode/extensions/vknabel.vscode-swift-development-environment-2.4.3/node_modules/vscode-languageclient/lib/client.js:1983:42)
at LanguageClient.handleConnectionClosed (/Users/daniel/.vscode/extensions/vknabel.vscode-swift-development-environment-2.4.3/node_modules/vscode-languageclient/lib/main.js:126:15)
at closeHandler (/Users/daniel/.vscode/extensions/vknabel.vscode-swift-development-environment-2.4.3/node_modules/vscode-languageclient/lib/client.js:1970:18)
at CallbackList.invoke (/Users/daniel/.vscode/extensions/vknabel.vscode-swift-development-environment-2.4.3/node_modules/vscode-jsonrpc/lib/events.js:71:39)
at Emitter.fire (/Users/daniel/.vscode/extensions/vknabel.vscode-swift-development-environment-2.4.3/node_modules/vscode-jsonrpc/lib/events.js:135:36)
at closeHandler (/Users/daniel/.vscode/extensions/vknabel.vscode-swift-development-environment-2.4.3/node_modules/vscode-jsonrpc/lib/main.js:221:26)
at CallbackList.invoke (/Users/daniel/.vscode/extensions/vknabel.vscode-swift-development-environment-2.4.3/node_modules/vscode-jsonrpc/lib/events.js:71:39)
at Emitter.fire (/Users/daniel/.vscode/extensions/vknabel.vscode-swift-development-environment-2.4.3/node_modules/vscode-jsonrpc/lib/events.js:135:36)
at IPCMessageReader.AbstractMessageReader.fireClose (/Users/daniel/.vscode/extensions/vknabel.vscode-swift-development-environment-2.4.3/node_modules/vscode-jsonrpc/lib/messageReader.js:135:27)
at ChildProcess.
Before updating the latest version of MSDE, autocompletion was not presenting any results or errors.
If I run sourcekite from the command line, I'm getting this output:
~/Repos/sourcekite/.build/x86_64-apple-macosx10.10/debug/sourcekite |||[main.swift:34] sourcekite - sourcekitd_initialize 1 |||[main.swift:42] sourcekite - state: endRequest |||[main.swift:43] sourcekite - input: 1 |||[main.swift:44] sourcekite - input length: 1
Moved this into #26
Should be fixed by #34. If not re-open or create a new issue
I am trying the extension with swift 4.1 and VSCode 1.22.1 on Ubuntu, but I get the following error: