{{ message }}
feat: publish a consumable packages.json for the new spago#5
Merged
Conversation
The new spago (1.x) takes a single packageSet source and dropped Dhall, so the forks-only `packages.dhall` overlay is no longer directly consumable: a `//` merge can't be expressed. Spike purescript-lua/purescript-lua#115 confirmed spago consumes a custom set via `packageSet.url`/`path`, with git package entries. Each release now also publishes `packages.json` — a RemotePackageSet of the pinned registry baseline (77.8.0) with the Lua forks overlaid as git entries. Consumers point `workspace.packageSet.url` at it and drop `extraPackages`. `src/packages.dhall` stays the single source of truth; the legacy `packages.dhall` asset is still published for Dhall / spago 0.21 consumers. - scripts/gen-package-set-json: build packages.json from src/packages.dhall onto the registry baseline (self-contained, nixpkgs dhall-json+jq+curl). - release.yml: generate + publish packages.json alongside packages.dhall; modernize to `gh release create` (drops the deprecated node12 release actions); bump checkout/install-nix/cachix to current majors. - test-set.yml: migrate the coherence check to the new spago — generate the set, then build test/ (now spago.yaml) against it via packageSet.path, so the generator is exercised on every push. - test/: spago.dhall/packages.dhall -> spago.yaml; remove the stale committed root packages.json (vestigial upstream snapshot, referenced nowhere); ignore the generated artifacts. - docs: ADR 0008 (supersedes the spago 0.21 pin in 0001); CONTRIBUTING + README updated to the new-spago packageSet.url flow.
There was a problem hiding this comment.
Pull request overview
This PR updates the package-set repo to support the new spago (1.x) by generating and publishing a consumable packages.json (RemotePackageSet) built from src/packages.dhall over a pinned PureScript Registry baseline, while keeping the legacy packages.dhall overlay for Dhall/spago 0.21 consumers.
Changes:
- Add
scripts/gen-package-set-jsonto generate a fullpackages.jsonfromsrc/packages.dhall+ registry baseline. - Migrate the coherence-check project under
test/from Dhall tospago.yamland update CI to generate/build against the JSON set. - Update release workflow to publish both
packages.jsonandpackages.dhall, plus docs/ADR/README/CONTRIBUTING to reflect the new consumption flow.
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Unisay
commented
Jun 23, 2026
src/packages.dhall used zero Dhall features beyond a flat record, and with the
forks migrating off spago 0.21 too, Dhall had no remaining purpose. Convert the
forks overlay to src/packages.json once and remove Dhall from the repo.
- src/packages.dhall -> src/packages.json (same {repo,version,dependencies}
overlay, now JSON).
- gen-package-set-json / gen-readme-table.sh read src/packages.json with jq;
drop dhall-to-json (and dhall-json from their nix shells).
- release.yml: stop publishing the legacy packages.dhall asset; only
packages.json. spago 0.21 / Dhall is no longer supported.
- README / CONTRIBUTING / ADR 0006 / ADR 0008 + .gitignore + test-set.yml
comments: point at src/packages.json; ADR 0008 records the wholesale Dhall
removal. The fork-level Dhall (dev-shell tool, treefmt formatter; ADR 0001/
0007) is removed in the per-fork migration pass.
Verified: generator still yields the 640-package set; coherence build green;
README table in sync.
- CONTRIBUTING.md:15: clarify the dev shell / flake.lock guidance is per-fork (forks carry flake.nix); the set repo has no flake and its CI builds through the pslua dev shell (#discussion_r3461467833)
- release.yml:19: drop the misplaced "generator pulls jq + curl" comment above install-nix-action (#discussion_r3461362852)
The packageSet.url example and latest-compatible-sets.json point at the tag this change is released under.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
The PureScript toolchain moved to the new spago (1.x), which takes a single
workspace.packageSetsource and dropped Dhall. Our forks-onlypackages.dhalloverlay was never a whole set: consumers merged it with the upstream set viaupstream-ps // upstream-lua. The new spago has no merge operator and no Dhall, so that overlay is no longer directly consumable.The spike in purescript-lua/purescript-lua#115 confirmed three ways (the spago docs, the
core/src/Config.purscodecs, and a working PoC) that the new spago consumes a custom set throughpackageSet.url/packageSet.path, and that such a set may carry git package entries. So the set can be a single, self-contained build input again.What
Each
psc-*release publishespackages.json: a RemotePackageSet with the pinned registry baseline (77.8.0) for the pure packages and the Lua forks overlaid as git entries ({ git, ref, dependencies }). A consumer pointsworkspace.packageSet.urlat it and drops theextraPackagesblock entirely. Dhall is dropped wholesale in the same change: the forks overlay becomessrc/packages.json(the single source of truth), the legacypackages.dhallasset is gone, and spago 0.21 / Dhall is no longer supported. The whole ecosystem moves to the new spago.Changes:
scripts/gen-package-set-jsonbuildspackages.jsonfromsrc/packages.jsonfolded onto the registry baseline. It is self-contained (pulls jq + curl from nixpkgs), the same pattern asscripts/gen-readme-table.sh, which now also reads the JSON overlay.release.ymlgenerates and publishespackages.json. While here it moves off the archived node12 release actions (actions/create-release,upload-release-asset) togh release create, and bumpscheckout/install-nix-action/cachix-actionto current majors.test-set.ymlmigrates the coherence check to the new spago: it generates the set, then buildstest/(now aspago.yamlpointingpackageSet.pathat the generated file) against it. The old check ranspago build -u "-g corefn"on a legacyspago.dhall, which the new spago in the pslua dev shell no longer accepts. So this also unbreaks the workflow, and exercises the generator on every push.test/moves fromspago.dhall+packages.dhalltospago.yaml. The stale rootpackages.json(an upstream snapshot from the first commit, referenced nowhere) is removed; the generated artifacts are gitignored.packageSet.urlflow.Verification
lua-ngxnet-new). A scratch project depending on prelude/effect/console/arrays/strings builds green against it viapackageSet.pathunder spago 1.0.4.test/coherence project (every fork) builds green the same way (184 modules, no unused-dependency errors).scripts/gen-readme-table.sh --checkpasses (the README table is unchanged).Follow-up
After merge I will cut
psc-0.15.15-20260623so the release carriespackages.json;latest-compatible-sets.jsonalready points at it. Then pslua's owntest/psswitches from its inlinedextraPackagesto thispackageSet.url, and the forks migrate their own builds to the new spago.