logger.js:21 Swift (Swift IDE) stderr 2018-11-16 17:00:20.849 sourcekit-lsp[13596:50be9700] could not open compilation database for /home/sam/code/Sources/XPkg noEntry.
If I turn on the atom-languageclient verbose logging, it looks like it's sending requests to the daemon, but not getting anything back.
On the Mac, I'm getting a little further. Communication seems to be flowing in both directions, according to the atom-languageclient log output. However, I don't seem to be getting useful data back - eg for auto-completion the reply back from sourcekit-lsp is correctly formatting but doesn't offer any actual suggestions.
I am almost definitely holding it wrong, and it's quite likely that my mistake might relate to atom-languageclient rather than sourcekit-lsp.
That said, if anyone on the team has any ideas, or would be willing to try out the Atom plugin, that would be really helpful.
I should have said that I believe I'm using the correct toolchain - the November 1st one - on both platforms. The sourcekit-lsp executable is built with it, as is the code that I'm trying to view with Atom.
You can ignore this particular message. This is about support for compile_commands.json files, which are used for supporting e.g. a cmake project using clangd. I should change the logging of this probably.
If you run the service with environment SOURCEKIT_LOGGING=2 (or 3) does that give any additional hints for either the linux or mac issues?
It does also look like the sourcekit-lsp process is logging some errors direct to the system console (bypassing the atom/web console), but they seem to be unreadable
When we log to the system console we also send an LSP window/logMessage notification. I'm not sure how that's hooked up in Atom. Alternatively, if you're on macOS you can open Console.app and search for process:sourcekit-lsp before launching and it should capture any messages with warning/error level.
Yeah, those are coming through to the console in Atom/WebKit I think, but don't seem to have any obvious red flags in them explaining why I'm getting no completion suggestions.
I've recently fixed some issues when running the service on linux, you may want to give it another try there.
About failing to get code-completion on mac, I have some suggestions to help identify the issue:
Try to get the service working with Sublime Text. We know the service works properly with Sublime so the outcome of this will help steer the investigation, for example:
if you get code-completion working on Sublime it would seem the issue lies on the Atom side. Get the SOURCEKIT_LOGGING output from Sublime and compare it with Atom, are there differences ?
If code-completion is not working on Sublime as well, then it must be something unrelated to the editor, either on the service+toolchain side or possibly the project that you are trying it on. To reduce variables try it on a test project that you get via swift package init