Skip to content

Automatically install project toolchain version if it is not currently installed on the host #239

@bkhouri

Description

@bkhouri

It would be ideal if swiftly automatically installed the project toolchain if it's not currently installed.

Steps to reproduce

  1. Create a swift package
  2. List all installed versions
  3. In the created package, specify a version in .swift-version file that is not currently installed
  4. swift build or swift --version, or swift test etc...
❯ swift --version
The swift version file `/Users/bkhouri/Documents/git/public/swiftlang/swift-package-manager/.swift-version` uses toolchain version main-snapshot-2025-02-24, but it doesn't match any of the installed toolchains. You can install the toolchain with `swiftly install`

Instead of that message, running swift should automatically install the version of the toolchain, thus streamlining the build process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions