Skip to content

Fix halogen:dev script - #1432

Merged
f-f merged 4 commits into
purescript:masterfrom
pete-murphy:fix-halogen-dev
Oct 22, 2026
Merged

f-f merged 4 commits into
purescript:masterfrom
pete-murphy:fix-halogen-dev

Conversation

@pete-murphy

@pete-murphy pete-murphy commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Description of the change

Fixes #1427.

Explanation of changes:

  • --outfile path is relative to the package directory (docs-search/client-halogen) and so ./../../generated-docs resolves to ./generated-docs (where spago docs outputs to). So this is assuming that the halogen:dev is intended to be used with generated docs for spago itself.
  • esbuild's serve mode (--servedir) does not read from stdin, which is where spago --bundle writes to, and serve mode doesn't seem to be necessary anyways because the HTML can be opened over file:// protocol.

Checklist:

  • Added the change to the "Unreleased" section of the changelog
  • Added some example of the new feature to the README
  • Added a test for the contribution (if applicable)

AI Disclosure

Did this by hand but used Opus 5.5 for research and review.

Demo

Running through the instructions in a clean checkout of the repo, in nix develop shell. (Fast forwarded through compiler output, I get Failed to call 'purs graph' error when running spago bundle -p spago-bin, but that seems unrelated?)

CleanShot.2026-10-22.at.12.48.47.AM-converted.mp4

pete-murphy and others added 3 commits October 21, 2026 21:19
Fixes 1427.

Explanation of changes:

- `--outfile` path is relative to the package directory
  (`docs-search/client-halogen`) and so `./../../generated-docs`
  resolves to `./generated-docs` (where `spago docs` outputs to). So
  this is assuming that the `halogen:dev` is intended to be used with
  generated docs for `spago` itself (and its dependencies).
- `esbuild`'s serve mode (`--servedir`) does not read from stdin, which
  is where `spago --bundle` writes to, and serve mode doesn't seem to be
  necessary anyways because the HTML can be opened over `file://`
  protocol.

@thomashoneyman thomashoneyman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked it out, works! Thanks!

@f-f f-f left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@f-f
f-f merged commit e7da6bf into purescript:master Oct 22, 2026
5 checks passed
@pete-murphy
pete-murphy deleted the fix-halogen-dev branch October 24, 2026 01:51
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.

NPM script halogen:dev is broken

3 participants