[swift-dev] Shipping sourcekitd-test/repl with Swift

Keith Smiley k at keith.so
Mon Aug 29 22:25:13 CDT 2016


Sorry to bump this thread, just wondering if anyone has any thoughts on
this now that (some) of the Swift 3.0 craziness is done.

-- 
Keith Smiley

On Sun, Jul 31, 2016, at 21:46, Keith Smiley via swift-dev wrote:
> Hey everyone,
> 
> Recently I've been working on making Swift autocomplete outside of Xcode
> (specifically vim). Of course to do this, I've been using
> [SourceKitten][0],
> which is a great bridge for interacting with `sourcekitd`.
> 
> While working on this, I also ran across `sourcekitd-test` and
> `sourcekitd-repl`
> from the Swift repo. These tools are also awesome for working with
> `sourcekitd`.
> `sourcekitd-test` even has practically the same command line interface as
> SourceKitten's complete command.
> 
> With `sourcekitd-test`:
> 
> ```
> $ sourcekitd-test -req=complete -offset=x file.swift -- [compiler args]
> ```
> 
> With SourceKitten:
> 
> ```
> $ sourcekitten complete --offset x --file file.swift -- [compiler args]
> ```
> 
> These 2 commands of course call through to `sourcekitd` in the same way,
> so this
> ends up with the same output as well.
> 
> All of this is just to show that I think these tools would be extremely
> valuable
> to have shipped with whichever Swift toolchains are bundled with Xcode,
> so users
> would automatically have tools for completion installed.
> 
> I'd love to hear some thoughts on this, and also if it's even a feasible
> thing
> to ask for. Also let me know if this post would be better suited for
> another
> list. I didn't feel like this was particularly appropriate for
> swift-evolution
> since there aren't really any implementation details in question here.
> 
> 
> [0]: https://github.com/jpsim/SourceKitten
> 
> 
> Thanks for reading!
> 
> --
> Keith Smiley
> 
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev


More information about the swift-dev mailing list