Skip to content

coroutine: bring purescript-lua-coroutine to production readiness #72

@Unisay

Description

@Unisay

The purescript-lua-coroutine fork is an early import (two commits: initial sources + a README) that was never modernised alongside the rest of the ecosystem. It currently fails to build against the current pslua compiler and is not part of the published package set.

Current state

  • Pins ancient package sets in packages.dhall: upstream-ps at psc-0.15.9-20230629 and upstream-lua at a 2023 release under the old Unisay/ org (Unisay/purescript-lua-package-sets psc-0.15.9-20230706).
  • Through that stale set it resolves prelude v6.0.2, whose Data/Unit.lua ships return {unit = nil}. The current pslua linker rejects it:
Error parsing foreign file ".../prelude/v6.0.2/src/Data/Unit.lua":
| return {unit = nil}
|                ^ unexpected 'n', expecting '(' or white space

This is the unit = nilunit = {} change (prelude >= v7.2.0); on the current prelude it goes away.

  • No ecosystem canon: no treefmt.nix, no .githooks/, no .github/workflows/ (CI), no AGENTS.md.
  • Not present in purescript-lua-package-sets src/packages.dhall.

Production-readiness checklist

  • Bump packages.dhall to the current sets (latest purescript/package-sets + latest purescript-lua/purescript-lua-package-sets release); drop the sha256: annotations so spago re-freezes.
  • Confirm it builds and links with the current pslua (spago build); the unit = nil linker error should resolve on the current prelude.
  • Apply the ecosystem canon: treefmt.nix (nix fmt), tracked .githooks/pre-commit + core.hooksPath, a CI workflow, AGENTS.md, and the org-link migration (Unisay/ -> purescript-lua/).
  • Pin the pslua flake input to current main, for consistency with the rest of the forks.
  • Add/verify scripts/build + scripts/test and luacheck the generated Lua.
  • Cut a release tag and add coroutine to purescript-lua-package-sets src/packages.dhall.

Surfaced while bumping the pslua dev input across the ecosystem: the rollout build gate caught coroutine and skipped it (reverted its lock), so its main branch is unchanged.

Metadata

Metadata

Assignees

Labels

area: package-setBug in a package-set fork (FFI/sources), not the compilerenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions