Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Settings don't default to default toolchain paths as they claim #126

Closed
CodingMarkus opened this issue Apr 11, 2024 · 1 comment
Closed

Comments

@CodingMarkus
Copy link

Settings claim that toolchain path defaults to Xcode default toolchain

Screenshot 2024-04-11 at 14 05 34

and sourcekit-lsp path defaults to the one from the toolchain path

Screenshot 2024-04-11 at 14 05 44

Neither claim is true. Both fields are empty on a fresh install and nothing works when they are empty. Unless you manually set them to the correct values, nothing will work.

Maybe /Applictations/Xcode.app has been hardcoded but that would be totally wrong. Xcode doesn't have to be named Xcode.app, you can name it Xcode 14.3.1 Beta 2.app if you like, totally valid, nor does it have to be in /Applications or even on your main drive at all.

Also you don't even need to install Xcode to get the SDK. The developer SDK is also available as a stand-alone download and it would install itself to /Library/Developer/CommandLineTools. It includes all the compilers and libraries, it just misses the Xcode IDE itself.

The correct path for sourcekit-lsp would be /usr/bin/sourcekit-lsp, which is a wrapper binary that always calls the real sourcekit-lsp from the currently active Xcode version or the currently active developer SDK.

To get the true path of the current sourcekit-lsp binary that /usr/bin/sourcekit-lsp actually calls, you have to run xcrun -find sourcekit-lsp, which in my case would return

/Volumes/Dev/Xcode/App/Xcode_15.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp

or to just get the path using xcode-select -p:

/Volumes/Dev/Xcode/App/Xcode_15.3.app/Contents/Developer

In case you don't have any Xcode installed or activated, but an SDK, it would print /Library/Developer/CommandLineTools.

@vknabel
Copy link
Owner

vknabel commented Jun 22, 2024

Hi, thanks for opening an issue. But I decided to archive this repository as today there is no good reason to actually use this extension anymore. Please use the official swift extension from apple.

@vknabel vknabel closed this as completed Jun 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants