Skip to content

simple PR to get this project building with the new Spago#41

Closed
afcondon wants to merge 1 commit into
purescript-lua:mainfrom
afcondon:feat/spago-yaml-migration
Closed

simple PR to get this project building with the new Spago#41
afcondon wants to merge 1 commit into
purescript-lua:mainfrom
afcondon:feat/spago-yaml-migration

Conversation

@afcondon

Copy link
Copy Markdown
Contributor

Full disclosure, I, Andrew, had Claude, an LLM, do this work and prepare the PR. However, i am using the resulting PureScript Lua build now and it is working fine in my limited examples.

Migrate the test PureScript project to use the new spago.yaml format, enabling compatibility with spago 0.93+ which dropped support for dhall-based configuration.

Changes:

  • Add test/ps/spago.yaml with extraPackages pointing to Lua-compatible forks (purescript-lua-prelude, purescript-lua-effect, etc.)
  • Update Golden/Spec.hs to use spago build instead of the deprecated spago build -u '-g corefn' (new spago generates corefn by default)
  • Update .gitignore to exclude spago build artifacts (library dependencies) while keeping Golden.* test directories
  • Regenerate golden files with updated package versions

The Lua-compatible packages are sourced from:

Migrate the test PureScript project to use the new spago.yaml format,
enabling compatibility with spago 0.93+ which dropped support for
dhall-based configuration.

Changes:
- Add test/ps/spago.yaml with extraPackages pointing to Lua-compatible
  forks (purescript-lua-prelude, purescript-lua-effect, etc.)
- Update Golden/Spec.hs to use `spago build` instead of the deprecated
  `spago build -u '-g corefn'` (new spago generates corefn by default)
- Update .gitignore to exclude spago build artifacts (library
  dependencies) while keeping Golden.* test directories
- Regenerate golden files with updated package versions

The Lua-compatible packages are sourced from:
- https://github.com/Unisay/purescript-lua-*
- https://github.com/purescript-lua/purescript-lua-*

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Unisay

Unisay commented Jan 19, 2026

Copy link
Copy Markdown
Collaborator

Thanks for PRs, I'll be reviewing them once I have a bit more spare time.

@Unisay

Unisay commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Thanks for this, Andrew, and for flagging the spago situation in the first place.

Once I dug into it, the migration turned out to be bigger than the test-project config on its own. To land it properly we also need to move the dev-shell toolchain off the pinned legacy spago (the flake still ships spago 0.21, so CI can't read a spago.yaml), make the build emit CoreFn explicitly (the new spago defaults to JS codegen, so the golden harness stops getting fresh corefn.json otherwise), and migrate the Lua package-set fork packages themselves. I'd rather not merge this half and leave the rest dangling.

I've written up the whole thing in #55, with the toolchain swap split out as a prerequisite in #54. Your extraPackages override approach is exactly what the plan builds on, so this PR was a genuinely useful starting point.

I'm going to take this one on and do it in my own PR. Thanks again for the contribution.

@Unisay Unisay closed this Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants