Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## {{releaseVersion}} - {{releaseDate}}

### Fixed

- Fix the wrong toolchain being shown as selected when using swiftly v1.0.1 ([#2014](https://github.com/swiftlang/vscode-swift/pull/2014))

## 2.14.3 - 2025-12-15

### Fixed
Expand Down
14 changes: 10 additions & 4 deletions src/ui/ToolchainSelection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,16 @@ async function getQuickPickItems(
);

if (activeToolchain) {
const currentSwiftlyVersion =
activeToolchain.manager === "swiftly"
? await Swiftly.inUseVersion("swiftly", cwd)
: undefined;
let currentSwiftlyVersion: string | undefined = undefined;
if (activeToolchain.manager === "swiftly") {
currentSwiftlyVersion = await Swiftly.inUseVersion("swiftly", cwd);
if (currentSwiftlyVersion === undefined) {
// swiftly <1.1.0 does not support JSON output and will report no active
// toolchain version. Fall back to using the active toolchain version as a
// last resort.
currentSwiftlyVersion = activeToolchain.swiftVersion.toString();
}
}
const toolchainInUse = [...xcodes, ...publicToolchains, ...swiftlyToolchains].find(
toolchain => {
if (currentSwiftlyVersion) {
Expand Down