Open award999 opened 4 weeks ago
Did some testing around this on Windows and I am able to reproduce if I remove the path to the swift runtimes directory. The swift toolchain installer actually adds three separate directories to PATH:
<user-dir>\AppData\Local\Programs\Swift\Runtimes\6.0.0\usr\bin
<user-dir>\AppData\Local\Programs\Swift\Toolchains\6.0.0+Asserts\usr\bin
<user-dir>\AppData\Local\Programs\Swift\Tools\6.0.0
If that first path to the Runtimes directory is malformed or deleted, then swift.exe will fail to launch and cause the extension to be unable to resolve the toolchain version. Unfortunately, this means that selecting a toolchain folder will never work on Windows. I suspect that this will require changes to the toolchain itself to get working.
Opened https://github.com/apple/swift-installer-scripts/issues/303 to see if there is anything that can be done with toolchain
Describe the bug On windows (UPDATE: also seen on macOS) even when swift.path setting is set and the
swift
exe exists in that directory, see this error messageSeems to only happen when swift is not in PATH
To Reproduce Steps to reproduce the behavior:
Expected behavior If have a valid toolchain selected, shouldn't matter if cannot detect in PATH
Environment
swift --version
): 6.0-SNAPSHOT and 5.10