Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CodingMarkus opened this issue Apr 11, 2024 · 0 comments
Open

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant