Closed thomashoneyman closed 1 year ago
Some more notes on your points:
Package
type (which later became Manifest
) is basically how I imagine this config will look like. E.g. take a look at the Package
, Target
, and Index
types.The dhall
package has some Template Haskell facilities to embed Dhall types into the compilation step so that:
I.e. we'd basically call makeHaskellTypes
on the Operation type
To expand a bit more on how the publish
UX could look like, here's an example:
$ spago publish
Generating package manifest from your config...
Running Registry checks..
Checks passed.
Publish your package by opening this ticket: https://github.com/purescript/spago/issues/new?body=etcetc
Note: to run the package checks we'd just import the same code that we use for running checks in the Registry CI
An update on this now that we have the new codebase in place (see the spaghetto
folder).
This command would:
With regards to the first point, once the new configuration format is stable the registry can support it directly, meaning there is no need to generate a manifest. Or, in other words, the manifest generation code can be moved to the registry codebase.
This is implemented in spaghetto since https://github.com/purescript/spago/commit/b95c82e90cf8a990c622ca09fed09e1b43a6da59.
It will run all the checks and make sure the package is in order for publishing, and the only thing missing is calling out to the registry API, which is blocked on https://github.com/purescript/registry-dev/issues/578
This is now released
Related to #204 and https://github.com/purescript/registry/pull/140 and depends on the new registry.
The PureScript registry supports a minimal API consisting of package additions, updates, and unpublishing. This issue tracks adding a command to Spago that at least would support adding and updating packages. To do this, we'll need to support a few things from the registry:
Manifest.dhall
definition. Spago will need to be able to generate this format fromspago.dhall
files, and thereforespago.dhall
files themselves probably have to be changed. (This could be tracked in a separate issue if necessary.)Operation.dhall
definition. Thespago publish
command would need to produce the correct JSON corresponding with the update or addition operations.All of this is a bit in flux: this is at least blocked until https://github.com/purescript/registry/pull/140 merges.