purescript / purescript/spago

Add facilities to query the association between package versions and package sets

Open
#1,218 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature help wanted size: small UX
Dominant language
PureScript
Stars
831
Forks
137
PR merge metrics
No merged PRs in 30d

Description

Right now it's hard to explore the relationship between a package, its versions, and the various package sets - there are only a few facilities:

  • spago ls packages will list the packages present in the package set that the project uses
  • spago registry package-sets will list the package sets that have been published, together with the compiler that they are compatible with

We should improve on that, and have ways to:

  1. list which packages exist in any given package set, not just the local one
  2. list which package sets a certain package version is part of

For each of the points above, I propose that:

  1. we extend spago registry package-sets $SET to show which packages are in the set
  2. we extend spago registry info $PACKAGE with a list of which package set each version is present in.

I'll note that we already have all this info in the Spago DB, and even have code in place to query it, and most likely just needs to be exposed:
https://github.com/purescript/spago/blob/b5a8ab980010ad08ed0c305d7ff06d337d1a0e89/src/Spago/Db.purs#L70-L80

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing database query code in src/Spago/Db.purs at the linked lines, then trace the handlers for spago registry package-sets $SET and spago registry info $PACKAGE. The work is done when the first command lists packages in the requested set and the second shows the package sets containing each version.

Written by the indexing model from the issue text.

Assessment

Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.