Repository navigation
Conversation
| ] | ||
| } | ||
| { db } <- ask | ||
| entries <- liftEffect $ Db.selectPackageSetEntriesBySet db setVersion |
There was a problem hiding this comment.
Looks like this is reading directly from the database without a prior getRegistry or fetchRegistry — the Nothing branch calls Registry.listPackageSets so that's ok bc it hydrates the daatabase, but this branch doesn't. Do we need to make sure this branch ensures we're up-to-date in the db, or is that happening somewhere else?
There was a problem hiding this comment.
Came back to this to verify, and was able to using an isolated cache:
registry package-sets 0.0.1 --json-> exit 1:No packages found in package set 0.0.1.- Adding
--refresh-> same failure. - Running
registry package-sets --jsonfirst -> initializes the registry. - Repeating the original command -> exit 0, 358 packages
Could we initialize/refresh the registry before querying these entries? With a fresh cache, querying 0.0.1 reports that no packages were found, even with --refresh. Listing all package sets first makes the identical query succeed, so that indicates that this branch needs the initialization path that populates the database.
| { metadata: Metadata.codec | ||
| , packageSets: CJ.array versionSetsCodec | ||
| } | ||
| output $ OutputJson combinedCodec { metadata: meta, packageSets: packageSetsByVersion } |
There was a problem hiding this comment.
fwiw, this changes the released JSON shape by moving published, location, and unpublished under metadata. I don’t know of existing consumers, but keeping those fields at the root and adding packageSets would preserve compatibility if we want to be extra-sure not to break anybody's scripting if they have it.
There was a problem hiding this comment.
(a github search came up with nothing so it's probably fine but I wanted to note it)
Fix #1218: in this PR we add the
spago registry package-sets $SETcommand, to explore the contents of each package set, together with the package set information for each package when callingspago registry info $PACKAGE