Skip to content

Failed to find Swift Toolchain on macOS #1502

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

Closed
0xTim opened this issue Apr 15, 2025 · 4 comments
Closed

Failed to find Swift Toolchain on macOS #1502

0xTim opened this issue Apr 15, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@0xTim
Copy link
Member

0xTim commented Apr 15, 2025

Describe the bug
When running on a clean install of macOS I'm getting the error "Failed to find Swift toolchain". This is a fresh VM with nothing installed.

Important Note: This environment has installed Swift via Swiftly and Xcode is not installed

To Reproduce

  1. Install Swift
  2. Install VSCode
  3. Install the extension
  4. Click "Create Swift Project"

Expected behavior
Toolchain discovered so I can create projects, build etc

Environment

  • OS: macOS 15.4
  • Swift version (output of swift --version): Swift version 6.1 (swift-6.1-RELEASE)
  • Visual Studio Code version: 1.99.2
  • vscode-swift version: 2.0.2

Additional context
Add any other context about the problem here.

Image
@0xTim
Copy link
Member Author

0xTim commented Apr 15, 2025

This might actually be a SwiftPM/Swiftly bug - I'm getting prompted to install xcrun and other developer tools. Why I need these is another question

@rbenegal
Copy link
Contributor

Thanks for reporting this @0xTim! I just tried this workflow today and I think @plemarquand has fixed with the latest version of the extension (version 2.2.0 - which should be published shortly, or the pre-release swift-vscode-2.3.20250415 which has been published already). Could you please give that a try?

@plemarquand
Copy link
Contributor

I think this should be resolved by #1470, but please do let me know if you're still experiencing this with a swiftly managed toolchain on macOS using the 2.2.0 extension (which is now released).

@0xTim
Copy link
Member Author

0xTim commented Apr 15, 2025

@plemarquand I now get "unable to automatically discover your Swift toolchain". I think this is a Swift/Swiftly issue - I get an error with swift package init as well when it tries to invoke xcrun with any swift command, e.g. swift package init. I'll close this and open an issue on Swiftly

@0xTim 0xTim closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants