Skip to content

Commit 86e0495

Browse files
committed
feat: migrate to the new spago (spago.yaml + published package set)
Build against the published purescript-lua package set via workspace.packageSet.url instead of the old spago.dhall + packages.dhall (upstream-ps // upstream-lua) merge. The new spago drives spago.yaml/spago.lock and dropped Dhall. - spago.dhall/packages.dhall -> spago.yaml (package name lua-control; the new spago rejects the purescript- prefix). backend.cmd "true" keeps codegen on corefn; the pslua invocation that used to live in spago.dhall's backend now runs from scripts/build over the emitted corefn. - flake.nix: spago 0.21.0 -> 1.x; drop the now-unused dhall dev-shell tool. - treefmt.nix: drop the dead Dhall formatter. AGENTS.md: spago 1.x, src/packages.json. - CI action versions bumped to current majors (checkout v5, install-nix v31). - Remove the upstream PureScript test sources under test/Test (never built: old sources globbed src/ only, and they carry JS FFI that doesn't target Lua). The Lua regression tests under test/regression stay.
1 parent 4fa4051 commit 86e0495

11 files changed

Lines changed: 905 additions & 60 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v5
1313

14-
- uses: cachix/install-nix-action@v27
14+
- uses: cachix/install-nix-action@v31
1515
with:
1616
extra_nix_config: |
1717
extra-substituters = https://cache.iog.io https://purescript-lua.cachix.org

AGENTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ A PureScript→Lua FFI fork in the [`purescript-lua`](https://github.com/purescr
1111

1212
## Formatting
1313

14-
`nix fmt` runs treefmt (`treefmt.nix`): nixfmt for Nix, `dhall format`, purs-tidy
14+
`nix fmt` runs treefmt (`treefmt.nix`): nixfmt for Nix, purs-tidy
1515
for `*.purs` (config in `.tidyrc.json`), and LuaFormatter for the `*.lua` FFI
1616
(config in `.lua-format`). LuaFormatter is used over StyLua because it keeps the
1717
parentheses pslua's foreign-file parser requires. The Lua line budget is 130
@@ -44,11 +44,11 @@ A bare `function … end` or an unparenthesised expression fails to parse.
4444

4545
## Toolchain
4646

47-
`flake.nix` pins everything through [`purescript-overlay`](https://github.com/thomashoneyman/purescript-overlay): purs 0.15.16 (`purs-bin.purs-0_15_16`), spago 0.21.0 (`spago-bin.spago-0_21_0`), Lua 5.1 (`lua51Packages`). The `pslua` input tracks `github:purescript-lua/purescript-lua`; keep `flake.lock` reasonably current, since a long-stale pslua pin won't create the `--lua-output-file` directory and CI fails.
47+
`flake.nix` pins everything through [`purescript-overlay`](https://github.com/thomashoneyman/purescript-overlay): purs 0.15.16 (`purs-bin.purs-0_15_16`), spago 1.x (`spago-bin.spago-1_0_4`), Lua 5.1 (`lua51Packages`). The `pslua` input tracks `github:purescript-lua/purescript-lua`; keep `flake.lock` reasonably current, since a long-stale pslua pin won't create the `--lua-output-file` directory and CI fails.
4848

4949
## Releasing
5050

51-
Tag-driven, with no GitHub Release or changelog entry. The full conventions live in the [package-set repo](https://github.com/purescript-lua/purescript-lua-package-sets/blob/master/CONTRIBUTING.md): push an annotated tag on `master`, bump this fork's `version` in the package set's `src/packages.dhall`, refresh `latest-compatible-sets.json`, and push a `psc-*` set tag.
51+
Tag-driven, with no GitHub Release or changelog entry. The full conventions live in the [package-set repo](https://github.com/purescript-lua/purescript-lua-package-sets/blob/master/CONTRIBUTING.md): push an annotated tag on `master`, bump this fork's `version` in the package set's `src/packages.json`, refresh `latest-compatible-sets.json`, and push a `psc-*` set tag.
5252

5353
## Decisions
5454

flake.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,13 @@
3838
checks.formatting = treefmtEval.config.build.check self;
3939
devShell = pkgs.mkShell {
4040
buildInputs = with pkgs; [
41-
dhall
4241
lua51Packages.lua
4342
lua51Packages.luacheck
4443
luaformatter
4544
nixfmt-rfc-style
4645
pslua.packages.${system}.default
4746
purs-bin.purs-0_15_16
48-
spago-bin.spago-0_21_0
47+
spago-bin.spago-1_0_4
4948
treefmt
5049
];
5150
# Robust pre-commit hook: point git at the tracked .githooks/ dir

packages.dhall

Lines changed: 0 additions & 9 deletions
This file was deleted.

scripts/build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ set -euo pipefail
44
echo "Building..."
55

66
spago build --quiet
7+
8+
pslua --foreign-path . --ps-output output --entry Control.Extend --lua-output-file dist/Control.Extend.lua

spago.dhall

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)