Skip to content

Toolchain path is one folder up from swift bin path #606

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

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

adam-fowler
Copy link
Contributor

Previously it was two folders up and swift executables were assumed to be in a usr/bin folder relative to the toolchain folder. It looks like this cannot be assumed. The arm64 toolchains generated by @futurejones are installed at /usr/libexec/swift and have their binaries folder in /usr/libexec/swift/bin. So the toolchain path is now set to one folder up instead and the binaries folder is set to be bin relative to the toolchain folder.

I have checked the sourcekit-lsp code to see if it is happy with this as a valid toolchain path. It appears to be, but will verify with developers

Previously it was two folders up and swift executables were assumed to be in a usr/bin folder relative to the toolchain folder. It looks like this cannot be assumed so the toolchain path is now one folder up instead.

I have also verified that sourcekit-lsp is happy with this as a valid toolchain path
@adam-fowler adam-fowler merged commit 113d4f3 into swiftlang:main Sep 13, 2023
@adam-fowler adam-fowler deleted the toolchain-path branch September 13, 2023 20:58
@hqnna
Copy link

hqnna commented Sep 18, 2023

Hello, I'm still getting this issue. Installed the AUR package swift-bin. Swift is installed into /usr/lib/swift with binaries symlinked into /usr/bin. Trying to set my paths as such:

  "swift.sourcekit-lsp.serverPath": "/usr/lib/swift/bin/sourcekit-lsp",
  "swift.path": "/usr/lib/swift/bin"

I'm still getting this error:

{"errno":-2,"code":"ENOENT","syscall":"spawn /usr/lib/usr/bin/swift","path":"/usr/lib/usr/bin/swift","spawnargs":["package","describe","--type","json"],"cmd":"/usr/lib/usr/bin/swift package describe --type json"}

@adam-fowler
Copy link
Contributor Author

This change hasn't been included in a release yet.

@hqnna
Copy link

hqnna commented Sep 19, 2023 via email

@adam-fowler
Copy link
Contributor Author

This is now in v1.5.2

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

Successfully merging this pull request may close these issues.

Error on Arch Linux: Path to shell executable "/usr/lib/usr/bin/swift" does not exist.
3 participants