[swift-dev] [SR-710][RFC] Automatically detecting XCTest test methods on Linux: Reflection? SourceKit?

Dmitri Gribenko gribozavr at gmail.com
Mon May 9 23:02:20 CDT 2016


On Mon, May 9, 2016 at 7:35 PM, Brian Gesiak <modocache at gmail.com> wrote:
> Thanks for the feedback, everyone!
>
> Porting SourceKit to Linux seems like a reasonable solution to me. Still,
> there are 354 lines of code in tools/SourceKit that reference "XPC", so a
> Linux port will take more than a few lines of source code changes.
>
> I imagine we'll need to insert some sort of shim layer that will use libxpc
> on OS X, and a hand-rolled solution for Linux. Alternatively, if anyone
> knows of a good open-source library that implements IPC for Linux (and that
> has a permissible license), that would be a great help here.

SourceKit actually supports "pluggable" transports.  There are two:
XPC, and an in-memory one (which could be bit-rotten a bit).  You can
either add the third one, or try to bootstrap with the in-memory one
for the first pass.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/


More information about the swift-dev mailing list