I believe that we'd get instant cross-platform availability, and lower the support requests if we could iron out a guide for running the LSP on Docker or Docker Compose. We could even publish a new image as an addition to Docker Swift with the LSP ready to go.
I've been working on getting it running on the Swift:4.2.1 image, but I'm stuck on what looks like a lib version incompatibility: Concurrency-Mac.cpp:128:3: error: use of undeclared identifier 'dispatch_barrier_sync_f';
Sorry, I don't have a swift build invocation for you, I've generally been using swift and CMake to accomplish the work :-). You need to figure out how to pass -Xcc -fblocks to swiftc through swift build.
There is a certain portion of the API that uses blocks and therefore must have blocks enabled. On XNU/Darwin, the blocks runtime is guaranteed to be available, and thus the driver always enables blocks support. On other targets, the functionality requires the blocks runtime be present so it is opt in. We build the blocks runtime as part of libdispatch for non-Darwin targets, so you should have the blocks runtime available.
The Ubuntu-based docker image I use has all the dependencies for building the swift toolchain (GitHub - apple/swift: The Swift Programming Language), which is presumably why I don't see this issue. I'm assuming libblocksruntime-dev is the critical piece.
@blangmuir, we actually build BlocksRuntime and have assumptions in the build now that we have libdispatch for the blocksruntime all over the place. libblocksruntime-dev should no longer be needed for swift on Linux.
How are you using it? I got an error with this test:
$ docker run -it wylieconlon/sourcekit-lsp bash
root@548678b621fb:/sourcekit-lsp# swift
error: failed to launch REPL process: process launch failed: 'A' packet returned an error: 8
root@548678b621fb:/sourcekit-lsp#