swiftlang / swiftly

A Swift toolchain installer and manager, written in Swift.
https://swiftlang.github.io/swiftly/
Apache License 2.0
428 stars 19 forks source link

Feature request: Swift SDK installation #123

Open kkebo opened 3 weeks ago

kkebo commented 3 weeks ago

What is Swift SDK?

Swift SDK is defined in SE-0387.

It can be installed by swift sdk install and uninstalled by swift sdk remove.

Nowadays, Swift SDKs are distributed in some places. It is expected to increase more and more in the future.

Motivations

The current installation process of Swift SDK has two problems I think.

  1. Users have to know the specific URLs to install Swift SDKs.
    • If swiftly can install Swift SDKs published on swift.org, this problem will be resolved. This can be achieved by wrapping the swift sdk command with swiftly.
  2. Installed Swift SDKs are shared in all toolchains regardless of their versions even if it is not usable in that version.
    • All Swift SDKs installed are stored in $HOME/.swiftpm/swift-sdks/ and shared between all Swift toolchains installed even if it cannot be usable in that version.

Proposed solutions

I'd like to discuss more.

adam-fowler commented 3 weeks ago

I'm not sure swiftly is the best place to resolve these issues. They should probably be fixed at the swift sdk level.

kkebo commented 3 weeks ago

I understand what you are saying, but I think it is too much of a responsibility for swift sdk to have the feature to download a Swift SDK from somewhere like swift.org without specifying its URL.

And it is what swiftly already does.

adam-fowler commented 3 weeks ago

Including @al45tair as he was working on this