Closed nrser closed 3 years ago
Hi @nrser! Sorry for the late response. I had quite a lot to do recently.
As of now I have never tested sourckit-lsp without Xcode installed. Does the alternative sourcekite driver work on your machine without Xcode? Might be worth a try.
To be honest testing compatibility has a relatively low priority as it takes me hours to setup and get back to daily work (uninstalling Xcode release and beta, after debugging, downloading both and reinstalling again).
Though there is a workaround. You can try developing inside a container. There is also a dev container for Swift. In those cases the extension and Swift would run on a lightweight Linux. I haven't tried those yet, but heard relatively often, that they do work very well.
Does it / should it work without XCode installed -- just
CommandLineTools
and/or the swift.org "Toolchain" download?I just have some small executables that compile file with a
Makefile
(viaxcrun --sdk macosx swiftc ...
), but would really help to have types and hints and all that. Seems like almost everyone on Mac installs XCode, but I'm stuck with a low bandwidth, unstable connection, and it's not making much progress on that 8G download.An outline of what I've tried follows, feel free to ask for any clarification or further information...
I'm on Mojave
10.14.6
, fully up-to-date.xcode-select
is aimed at the command line tools:This seems to give me Swift
5.0.1
:Didn't find any
sourcekit-lsp
under/Library/Developer/CommandLineTools
, so I downloaded theswift-5.2.5-RELEASE.xctoolchain
from swift.org, which includessourcekit-lsp
atI toyed around with SDE's settings, current have:
When I click in a
.swift
file, in VCode's output forswift
I see:I see a
MacOSX10.14.sdk
in the command line tools at:(actually, a symlink to a
MacOSX.sdk
file in that same directory), but I don't know how to getsourcekit-lsp
to use it (or if it's usable with theswift-5.2.5-RELEASE.xctoolchain
).I also tried
swift-5.1.3-RELEASE.xctoolchain
, thinking maybe Swift 5.2 wasn't compatible with macOS 10.14 or something. Didn't seem to really make a difference.I've seen this error in the output as well:
Thanks in advance for any help or insight.