[swift-dev] Integrating SourceKit into ubuntu

Alex Blewitt alblue at apple.com
Tue Feb 21 03:22:16 CST 2017


> On 20 Feb 2017, at 23:04, FĂ©lix Fischer via swift-dev <swift-dev at swift.org> wrote:
> 
> How much of it is possible? I want to make a plugin for autocompletion and syntax highlighting that is cross-platform too.


The sourcekit library now builds in a single pass on Linux when the dispatch libraries are available in the build. This is in master, but it's not been cherry-picked yet onto the Swift 3.1 branch:

https://github.com/apple/swift/blob/96f92a94285a77b63707a50fb0d4e5f21b9372ca/CMakeLists.txt#L364-L369 <https://github.com/apple/swift/blob/96f92a94285a77b63707a50fb0d4e5f21b9372ca/CMakeLists.txt#L364-L369>

You should be able to cherry pick

3e9f66c6cae
1673b5e8fd3

onto swift 3.1 in order to have that built there.

At the moment the build scripts don't package up the libsourcekitd library in the downloadable builds but you can experiment with it like that.

> Another proyect I'd like to take on is to make an error-checker for text editors. Is there a way of collecting compiling errors in some structure that is easy to handle with a program?
> If not a Sublime/Atom/Vim plugin, I'd want to make a base for those plugins to be able to exist.

You should look at SourceKitten, which wraps libsourcekit with a network protocol, and at the Language Server Protocol which is a generic way of hosting language backends with a generic front end editor. There's also SDE which originally used sourcekitd-repl, but which looks like is targetting sourcekit for the upcoming 2.0 release: 

https://github.com/jinmingjian/sde

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170221/2613c203/attachment.html>


More information about the swift-dev mailing list