swiftly icon indicating copy to clipboard operation
swiftly copied to clipboard

Add swift package index badges for swiftly

Open cmcgee1024 opened this issue 1 year ago • 8 comments
trafficstars

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

cmcgee1024 avatar Aug 23 '24 18:08 cmcgee1024

The badge doesn't include Linux.

adam-fowler avatar Aug 24 '24 06:08 adam-fowler

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.

futurejones avatar Aug 24 '24 08:08 futurejones

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 avatar Aug 24 '24 10:08 cmcgee1024

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.

cmcgee1024 avatar Aug 24 '24 11:08 cmcgee1024

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.

futurejones avatar Aug 24 '24 11:08 futurejones

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.

cmcgee1024 avatar Aug 24 '24 13:08 cmcgee1024

Should we close this PR?

shahmishal avatar Apr 01 '25 07:04 shahmishal

I'd still like to get the badges working. Once we have a vendored libarchive for swiftlang it should make the Linux badge green, avoiding confusion about Linux support.

cmcgee1024 avatar Apr 01 '25 12:04 cmcgee1024