purescript / spago

🍝 PureScript package manager and build tool
BSD 3-Clause "New" or "Revised" License
792 stars 132 forks source link

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

Open f-f opened 7 months ago

f-f commented 7 months ago

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:

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