Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link directly to package repositories #438

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ileitch
Copy link

@ileitch ileitch commented Nov 3, 2023

Motivation:

This change updates the new Packages page to link directly to package repositories rather than the Swift Package Index. A new section has been added to display secondary links, where a link to the Swift Package Index now resides. swiftinit.org is one such alternative index that could be added in a future PR.

Linking directly to the Swift Package Index is problematic for a few reasons:

  1. It forms a 1-1 relationship between swift.org and the Swift Package Index, which excludes the option for other community sites to be represented. This tight relationship also discourages the development of alternative indexes, as the Swift Package Index is implied to be the "official" index.
  2. People accustomed to visiting repositories directly may be unfamiliar with the Swift Package Index, which leads to a confusing experience.
  3. The Swift Package Index deprives package authors of GitHub stars and potentially even sponsors because it does not display the appropriate links. Instead, it largely duplicates the content already present on the source repository and thus reduces the likelihood that a visitor clicks through to the repository. Perhaps controversially, the Swift Package Index instead displays its own prominent Supporters link.

Modifications:

The main URL for a package is now the source repository. A new section has been added for displaying secondary links, such as the Swift Package Index.

This change does not change the behavior of the "Browse more packages" button, which currently links to the Swift Package Index. Perhaps a follow-up PR could similarly change this feature to display multiple indexes.

Result:

Screenshot 2023-11-03 at 13 12 58

This change updates the new Packages page to link directly to package repositories rather than the Swift Package Index. A new section has been added to display secondary links, where a link to the Swift Package Index now resides. swiftinit.org is one such alternative index that could be added in a future PR.

Linking directly to the Swift Package Index is problematic for a few reasons:
1. It forms a 1-1 relationship between swift.org and the Swift Package Index, which excludes the option for other community sites to be represented. This tight relationship also discourages the development of alternative indexes, as the Swift Package Index is implied to be the "official" index.
2. People accustomed to visiting repositories directly may be unfamiliar with the Swift Package Index, which leads to a confusing experience.
3. The Swift Package Index deprives package authors of GitHub stars and potentially even sponsors because it does not display the appropriate links. Instead, it largely duplicates the content already present on the source repository and thus reduces the likelihood that a visitor clicks through to the repository. Perhaps controversially, the Swift Package Index instead displays its own prominent Supporters link.

This change does not change the behavior of the "Browse more packages" button, which currently links to the Swift Package Index. Perhaps a follow-up PR could similarly change this feature to display multiple indexes.
@tomerd
Copy link
Member

tomerd commented Nov 3, 2023

cc @daveverwer

@heckj
Copy link

heckj commented Nov 3, 2023

This PR keeps the link to SPI, but in all honesty I'd prefer the SPI link to be the primary one - the metadata on their site ABOUT the package is frequently more relevant to me than the README of the package itself.

FWIW, I wouldn't want to link to libraries to the exclusion of the content provided by Swift Package Index, as it provides a lot of additional detail (which versions of swift it works with, what platforms it's compatible with) that many Authors don't - and reasonably so. I'm not personally fussed by the indirect nature of the links to the final repositories, so this isn't all that important to me (as a user of this page), while recognizing that this is my opinion and others may feel notably different about it.

@tomerd tomerd self-assigned this Nov 4, 2023
@ileitch
Copy link
Author

ileitch commented Nov 4, 2023

This PR keeps the link to SPI, but in all honesty I'd prefer the SPI link to be the primary one - the metadata on their site ABOUT the package is frequently more relevant to me than the README of the package itself.

I think we need to find an approach that is reasonable to the majority of visitors, which is what I have attempted here. For those that know and prefer the SPI pages, the link is there for them to use. While it may be your preference for SPI to remain the primary URL, it doesn't do much to address my main concern, which is the exclusion of other community sites. Let's say we keep SPI as the primary URL, and GitHub and other sites all become a secondary link, I think this would still discourage the development of other indexes, because Apple has clearly chosen SPI as the winner.

... as it provides a lot of additional detail (which versions of swift it works with, what platforms it's compatible with)

Just want to point out that this information is shown on the swift.org page too. The reamining information available on the SPI page is largely information already availabe on the GitHub repo main page, or under the insights tab.

EDIT: This is perhaps more of a bug report for the SPI, but I want to add that in the case of some tools, the SPI page is misleading because of the large "Use this package" button which encourages installation via the SPM. For SwiftLint, Periphery and likely other tools, installation via the SPM is not supported. Linking directly to the source repo avoids this potential source of confusion.

@tayloraswift
Copy link
Contributor

tayloraswift commented Nov 5, 2023

i think when most people get started with a package, the first place they go is the project repository, and then branch off from there. the GitHub repo is where the package is built, that’s the place where you might find the authors to file an issue with, that’s where you check for new git tags.

to me, linking to the project repository makes sense. it will be more convenient for users and will help them get started with packages more quickly. the package author is likely already linking to the Swift Package Index through status badges in the README, so if users are interested in build information, that’s still easily accessible. if the package author is not linking to the Swift Package Index, the build information is non-authoritative because it hasn’t been fully vetted by the project maintainers.

@tomerd
Copy link
Member

tomerd commented Nov 6, 2023

thanks folks for all the useful feedback. mostly fyi, the website workgroup will discuss this on its next meeting to drive a resolution

@tkremenek
Copy link
Member

Having several package indexes speaks to the Swift project's success and its developer community's vibrancy.

While SwiftPackageIndex is not the official package index of the Swift project, it provides significant value across the core index, the build matrix, and the documentation hosting features. Over the years, it gathered investment and support from key community members.

The Core Team believes there is highly compelling value in capitalizing on these investments in SwiftPackageIndex to surface package information on Swift.org to celebrate and further cultivate the growth of the Swift community. Naturally, we should continue to evaluate (and re-evaluate) the best solutions to support these goals for the project and the community over time. Presently, the Core Team considers integrating data from SwiftPackageIndex to be the most appropriate path.

@0xTim
Copy link
Collaborator

0xTim commented Nov 29, 2023

@ileitch thanks for the PR! Given the comments from Ted, we have a better idea of where things stand so would like to work to get the PR merged with some tweaks. We want to add the GH link, but would rather it be the secondary link, using an image on the card to link out (this also allows us to support GitLab and Bitbucket as well as needed). Would you be able to make the change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants