swiftlang / swiftly

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

Add swift package index badges for swiftly #160

Open cmcgee1024 opened 1 month ago

cmcgee1024 commented 1 month ago

Now that the swiftly package documentation is published to the swift package index swiftly can make use of the badges available from that site. The badges can be viewed here on the branch: https://github.com/cmcgee1024/swiftly/blob/spi-badges/README.md

adam-fowler commented 1 month ago

The badge doesn't include Linux.

futurejones commented 1 month ago

swiftly is a command line tool for installing the swift toolchain not a package that someone can include in their swift project. It doesn't make any sense having swiftly listed on swift package index. It makes even less sense to use badges from this site as they are not relevant to the status or build state of the swiftly project.

cmcgee1024 commented 1 month ago

The badge doesn't include Linux.

It's because currently swiftly can only build on Linux if the system has libarchive-devel installed. I hope that #154 will fix that.

cmcgee1024 commented 1 month ago

not a package that someone can include in their swift project

Swiftly is a package. It has a Package.swift file. It can be added as a dependency from another package, and they would get the swiftly product there, runnable via swift run swiftly within their package. There is a platform abstraction in SwiftlyCore that may be worth exposing as a library API at some point, or other functions related to toolchain fetching and selection. We don't indicate in our documentation that any of these things are supported API, however, so use at your own risk.

It doesn't make any sense having swiftly listed on swift package index

Since swiftly is a package and has DocC documentation, including a full command-line reference, getting started guide, and some tutorials, the SPI site is able to host our documentation, which is good in terms of being able to provide publicly accessible links to beautifully rendered content. The package index also provides some nice project overview statistics. I think that these are all good things for discoverability.

It makes even less sense to use badges from this site as they are not relevant to the status or build state of the swiftly project.

The badges are giving some status information about swiftly. The code is up-to-date with the latest Swift toolchains. Also, it reveals that there are problems at the moment building swiftly with Linux, which is the libarchive system dependency. I am exploring options there.

futurejones commented 1 month ago

The README information on being displayed on SPI and the documentation are being pulled from main branch and is not correct for the current release version 0.3.
This gives a bad experience, especially for people who are new to swift and are expecting an easy to use installer.

cmcgee1024 commented 1 month ago

The README information on being displayed on SPI and the documentation are being pulled from main branch and is not correct for the current release version 0.3. This gives a bad experience, especially for people who are new to swift and are expecting an easy to use installer.

Thank you for this feedback.

The README and the DocC documentation both currently describe how to install the 0.3 release until the next release is generally available. I will revise all of the instructions at the time of the next release.

https://github.com/swiftlang/swiftly https://swiftpackageindex.com/swiftlang/swiftly/main/documentation/swiftlydocs/getting-started

To download swiftly and install Swift, run the following in your terminal, then follow the on-screen instructions. curl -L https://swiftlang.github.io/swiftly/swiftly-install.sh | bash

The hope is that new users will read this bit right away. I'm open to suggestions on how to make the new user flow clearer in the interim.

I agree that SPI should probably not default to the main branch for a package, and that applies to libraries packages too. It puts the extra effort on packages to identify unreleased features in their documentation.