fix: point pslua at github, move to a current set + nix CI (#60)#2
Merged
Conversation
The pslua flake input was a dead local path (`/home/yura/...`), so the dev shell could not be entered at all. Point it at `github:Unisay/purescript-lua`, switch the dev shell to Lua 5.1 (it was pinned to 5.3) and pin purs, matching the other package-set forks. `packages.dhall` was on the ancient `psc-0.15.8` draft set, whose `unsafe-coerce` (v6.0.0) ships an FFI value that is not parenthesised and so trips pslua's foreign-file parser. Bump to the current set, which carries `unsafe-coerce` v6.1.0, so the fork builds again. CI moves onto the nix + overlay canon: build under `set -euo pipefail`, luacheck `--std lua51 --no-unused-args` over the generated `dist/` (this fork has no hand-written FFI of its own).
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s Nix-based development and CI setup so the repo builds reliably again: it replaces a dead local pslua flake input with the upstream GitHub source, refreshes the PureScript/Lua package-set inputs to a current set, and modernizes CI to build via nix develop and validate generated Lua (Lua 5.1).
Changes:
- Harden
scripts/buildwithset -euo pipefailand rely onspago buildunder the Nix dev shell. - Update
packages.dhallto merge a current upstream PureScript package set with the Lua-specific overlay set. - Rework Nix flake devShell inputs (Lua 5.1, pinned
purs) and migrate GitHub Actions CI from Node/bower to Nix + luacheck.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
scripts/build |
Enables strict bash mode for more reliable build failures in CI/dev. |
packages.dhall |
Switches to newer package sets and merges PureScript upstream with Lua overlay. |
flake.nix |
Fixes pslua to a GitHub flake input; updates devShell tooling (Lua 5.1, pinned purs). |
flake.lock |
Updates locked inputs to match the new flake configuration and dependencies. |
.gitignore |
Ignores .spago/ working directory artifacts. |
.github/workflows/ci.yml |
Migrates CI to Nix (nix develop) and adds Lua output linting via luacheck. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Align the flake with the other forks: purescript-overlay (purs-bin.purs-0_15_16, spago-bin.spago-0_21_0, lua51Packages, nixfmt-rfc-style, luaformatter, treefmt) instead of easy-purescript-nix, and lock pslua to the current HEAD so dist/ is created on a clean build.
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.
Fixes purescript-lua/purescript-lua#60.
The
psluaflake input was a dead local path (/home/yura/...), sonix developcould not even build the dev shell. This points it atgithub:Unisay/purescript-luaand moves the dev shell onto thepurescript-overlaysetup the rest of the forks share, replacing an off-targeteasy-purescript-nixshell that was still pinned to Lua 5.3. The fork now lines up with the others: purs 0.15.16, spago 0.21.0, and a Lua 5.1 toolchain.The fork was also stuck on the ancient
psc-0.15.8draft package set. Itsunsafe-coerce(v6.0.0) ships an FFI value that is not wrapped in parentheses, which trips pslua's foreign-file parser (the format requiresidentifier = (<value>)). Bumping to the current set picks upunsafe-coercev6.1.0, whose FFI is parenthesised, so the fork compiles again.CI moves off the dead npm/bower/setup-purescript flow onto the nix + overlay canon the other forks use:
scripts/buildunderset -euo pipefail, and luacheck--std lua51 --no-unused-args. This fork has no hand-written Lua FFI of its own (Safe.Coerceis pure PureScript overunsafeCoerce), so luacheck runs over the generateddist/to confirm the output is valid Lua 5.1.Verification
nix develop -c ./scripts/buildcompiles the fork from a clean checkout (dist/is created by the build,unsafe-coercev6.1.0 is fetched and parses), and luacheck is clean ondist/Safe_Coerce.lua.