How SourceKitten resolves SourceKit
mainSourceKitten searches for the SourceKit framework in the following order:
$XCODE_DEFAULT_TOOLCHAIN_OVERRIDE$TOOLCHAIN_DIRxcrun -find swift/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain~/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain~/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
On Linux:
SourceKit is expected to be at /usr/lib/libsourcekitdInProc.so or specified via the LINUX_SOURCEKIT_LIB_PATH environment variable.