Skip to content

Support Custom Toolchains #470

@johnbute

Description

@johnbute

I came across a case where I had a local toolchain (.tar.gz format) generated from a CI build. However, it took me a moment to realize that swiftly does not support the use of custom toolchains.

I propose adding a 4th Toolchain version: custom()
which supports installation from local .tar.gz or .pkg files, and maybe from url (https://ci.swift.org/job/swift-PR-toolchain-macos/..../artifact/branch-main/swift-PR-....-osx.tar.gz).

Alongside a couple refactoring changes and updating methods to handle custom toolchain selectors, users would be able to install custom toolchains just like any stable or snapshot release:

swiftly install <path-of-custom-toolchain> --name <name-of-toolchain>
or
swiftly install <url-of-custom-toolchain> --name <name-of-toolchain>

Afterwards when listing toolchains, users will be able to tell the difference between custom and non-custom toolchains

`swiftly list

Swift 6.2.0
Swift 6.1.0
Swift foo (custom)
`

Finally, users can use this toolchain just like any other toolchain version:

swiftly use foo-toolchain

Wondering what people think about this, open to feedback, suggestions, and comments.

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