chore: normalize build tooling + luacheck-clean FFI#3
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s build/CI tooling to use Nix flakes and aligns Lua linting/FFI conventions with a Lua 5.1 target, while also making a small luacheck-driven cleanup in the Lua FFI.
Changes:
- Switch flake tooling from
easy-purescript-nixtopurescript-overlay, and add flake-local cache configuration. - Replace the existing GitHub Actions workflow with a Nix-based CI flow (
nix develop -c ./scripts/build, optional./scripts/test, andluacheck). - Clean up Lua FFI
checkThrowsto avoid an unusedpcallresult.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/Test/Assert.lua |
Removes the unused second return value from pcall to satisfy luacheck. |
flake.nix |
Reworks the dev shell to use purescript-overlay and adds nixConfig substituters/keys. |
flake.lock |
Updates/pins flake inputs to match the new overlay-based setup. |
.github/workflows/ci.yml |
Replaces legacy JS/bower-based CI with Nix-based build/test/lint steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+24
to
+25
| - name: Test | ||
| run: if [ -f scripts/test ]; then nix develop -c ./scripts/test; fi |
…pts/build, run test via bash)
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.
Normalize this fork's build tooling to the ecosystem canon.
nix develop -c ./scripts/build,./scripts/test,luacheck).nix flake update.--std lua51 --no-unused-args: matches the Lua 5.1 target (math.pow/atan2 are valid there) and the FFI convention of curried fallback arguments the native impl ignores.Verified locally: build, test (where present), and luacheck all green.
Also drops the unused
pcallresult incheckThrows(local success = pcall(fn)) so luacheck is clean. Behaviour-identical.Note: the PureScript test suite under
test/is not exercised by this CI. Reviving the upstream suites (with their Lua 5.1 fixes) is a separate upstream-sync task; this PR only normalizes build tooling.