Search for Swift packages on GitHub

Hi all,

I was missing a small tool somewhat akin to npm (specifically npm's search and install functionality) for the swift ecosystem so I spent some time writing something to fill that gap. I'd really love some feedback on the idea and usability :slight_smile:

The basic idea is that it's hard to find suitable packages when writing a swift library or executable. There is no single centralized listing of all packages (packagecatalog.com and swiftmodules.com can only have *so* current data), so this tool queries GitHub's API directly for repos written in Swift that include a file named Package.swift. It offers ways to search for packages, display more info about them and add them to your package manifest.

You can find the project here: https://github.com/kiliankoe/apodidae

It conveniently installs as `swift-catalog` so that you can run it like a subcommand of swift itself as `swift catalog`. The basic interaction is also shown in the README in more detail.

There's still quite a few rough edges and the code definitely needs some cleanup, it's more of a test than something that should be depended on at this point I guess :stuck_out_tongue:

Cheers,
Kilian

I really like this idea, however what I really want to know about a package
usually includes: does it support my platform, does it depend on
Foundation, what other modules it depends on, what versions of Swift it
builds on (including nightly builds), and how well its documented. I don鈥檛
know how this can be done by simply querying github鈥檚 API though, it鈥檚
bound to require at least some involvement on the part of the package
author.

路路路

On Tue, Aug 8, 2017 at 7:13 PM, Kilian Koeltzsch via swift-users < swift-users@swift.org> wrote:

Hi all,

I was missing a small tool somewhat akin to npm (specifically npm's search
and install functionality) for the swift ecosystem so I spent some time
writing something to fill that gap. I'd really love some feedback on the
idea and usability :slight_smile:

The basic idea is that it's hard to find suitable packages when writing a
swift library or executable. There is no single centralized listing of all
packages (packagecatalog.com and swiftmodules.com can only have *so*
current data), so this tool queries GitHub's API directly for repos written
in Swift that include a file named Package.swift. It offers ways to search
for packages, display more info about them and add them to your package
manifest.

You can find the project here: https://github.com/kiliankoe/apodidae

It conveniently installs as `swift-catalog` so that you can run it like a
subcommand of swift itself as `swift catalog`. The basic interaction is
also shown in the README in more detail.

There's still quite a few rough edges and the code definitely needs some
cleanup, it's more of a test than something that should be depended on at
this point I guess :stuck_out_tongue:

Cheers,
Kilian

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

You're absolutely right about the additional information. Unfortunately some of these (does it support my platform, what versions of Swift it builds on) are hard to tell without actually building the package several times with differing hardware/toolchains. Others (does it depend on Foundation, how well it's documented) would at least require analyzing the complete source, which still isn't quite feasible without a dedicated service elsewhere having already completed that work.
For authors that have integrations set up with services that help with test coverage, documentation etc. it might be possible to just hook into those, but unfortunately the count of these isn't close to anything that would make this worth it. At least as far as I know.

The list of dependencies listed in a packages' manifest however can easily be pulled into this, in fact I already have that queued up. It's definitely nothing major but easily included.

Thanks for the list of suggestions though! They're much appreciated :slight_smile:

Cheers,
Kilian

路路路

On 9. Aug 2017, at 03:08, Taylor Swift <kelvin13ma@gmail.com> wrote:

I really like this idea, however what I really want to know about a package usually includes: does it support my platform, does it depend on Foundation, what other modules it depends on, what versions of Swift it builds on (including nightly builds), and how well its documented. I don鈥檛 know how this can be done by simply querying github鈥檚 API though, it鈥檚 bound to require at least some involvement on the part of the package author.

On Tue, Aug 8, 2017 at 7:13 PM, Kilian Koeltzsch via swift-users <swift-users@swift.org> wrote:
Hi all,

I was missing a small tool somewhat akin to npm (specifically npm's search and install functionality) for the swift ecosystem so I spent some time writing something to fill that gap. I'd really love some feedback on the idea and usability :slight_smile:

The basic idea is that it's hard to find suitable packages when writing a swift library or executable. There is no single centralized listing of all packages (packagecatalog.com and swiftmodules.com can only have *so* current data), so this tool queries GitHub's API directly for repos written in Swift that include a file named Package.swift. It offers ways to search for packages, display more info about them and add them to your package manifest.

You can find the project here: https://github.com/kiliankoe/apodidae

It conveniently installs as `swift-catalog` so that you can run it like a subcommand of swift itself as `swift catalog`. The basic interaction is also shown in the README in more detail.

There's still quite a few rough edges and the code definitely needs some cleanup, it's more of a test than something that should be depended on at this point I guess :stuck_out_tongue:

Cheers,
Kilian

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

I鈥檓 pretty sure any serious package author will have Travis or some other
CI set up for their library. Checking for a CI service is a good way to
filter out low-quality repos that are little more than just code dumps. The
swift version can be detemined by reading the Package.swift file. Most
packages also have shields in their readme.md鈥檚, so it might be worth
checking for common shields like `platform`.

路路路

On Wed, Aug 9, 2017 at 4:33 AM, Kilian Koeltzsch <me@kilian.io> wrote:

You're absolutely right about the additional information. Unfortunately
some of these (does it support my platform, what versions of Swift it
builds on) are hard to tell without actually building the package several
times with differing hardware/toolchains. Others (does it depend on
Foundation, how well it's documented) would at least require analyzing the
complete source, which still isn't quite feasible without a dedicated
service elsewhere having already completed that work.
For authors that have integrations set up with services that help with
test coverage, documentation etc. it might be possible to just hook into
those, but unfortunately the count of these isn't close to anything that
would make this worth it. At least as far as I know.

The list of dependencies listed in a packages' manifest however can easily
be pulled into this, in fact I already have that queued up. It's definitely
nothing major but easily included.

Thanks for the list of suggestions though! They're much appreciated :slight_smile:

Cheers,
Kilian

> On 9. Aug 2017, at 03:08, Taylor Swift <kelvin13ma@gmail.com> wrote:
>
> I really like this idea, however what I really want to know about a
package usually includes: does it support my platform, does it depend on
Foundation, what other modules it depends on, what versions of Swift it
builds on (including nightly builds), and how well its documented. I don鈥檛
know how this can be done by simply querying github鈥檚 API though, it鈥檚
bound to require at least some involvement on the part of the package
author.
>
> On Tue, Aug 8, 2017 at 7:13 PM, Kilian Koeltzsch via swift-users < > swift-users@swift.org> wrote:
> Hi all,
>
> I was missing a small tool somewhat akin to npm (specifically npm's
search and install functionality) for the swift ecosystem so I spent some
time writing something to fill that gap. I'd really love some feedback on
the idea and usability :slight_smile:
>
> The basic idea is that it's hard to find suitable packages when writing
a swift library or executable. There is no single centralized listing of
all packages (packagecatalog.com and swiftmodules.com can only have *so*
current data), so this tool queries GitHub's API directly for repos written
in Swift that include a file named Package.swift. It offers ways to search
for packages, display more info about them and add them to your package
manifest.
>
> You can find the project here: https://github.com/kiliankoe/apodidae
>
> It conveniently installs as `swift-catalog` so that you can run it like
a subcommand of swift itself as `swift catalog`. The basic interaction is
also shown in the README in more detail.
>
> There's still quite a few rough edges and the code definitely needs some
cleanup, it's more of a test than something that should be depended on at
this point I guess :stuck_out_tongue:
>
> Cheers,
> Kilian
>
>
> _______________________________________________
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
>
>

Terms of Service

Privacy Policy

Cookie Policy