document how to run the tests, and fix the build scripts on Debian and Ubuntu #8

Open
cdudek wants to merge 2 commits from cdudek/docs/build-and-test-notes into main
cdudek commented 2026-08-15 19:55:29 +02:00 (Migrated from github.com)

Thank you for elk-herd, and for the code tour in CONTRIBUTING.md. It made finding my way around a 17k line Elm app far easier than I expected.

I built it from source this week and ran into three small things. This is documentation plus a one character change in two shell scripts. No Elm was touched.

How to run the tests. tests/ has 125 passing tests, but nothing says how to run them, and the obvious invocations fail: npx elm-test and elm-test@latest now expect elm 0.19.2 and stop with ELM VERSION MISMATCH, while the elm-test@0.19.1 tag is deprecated and runs nothing at all. npx elm-test@0.19.1-revision17 works (125 passed, about 1.5s). Added as its own step in the README.

The build scripts need bash. Both declare #!/bin/sh but use function name { }, and make-prod.sh also uses local. On macOS /bin/sh is bash, so this never shows. On Debian and Ubuntu /bin/sh is dash, and the script stops at Syntax error: "}" unexpected, which leaves no way to build from source there. Changed the shebang to #!/bin/bash in both. I checked the failure under dash, and rebuilt on macOS afterwards to confirm nothing changed there.

Elm 0.19.1 on Apple Silicon is an x86_64 binary and needs Rosetta 2. One sentence, plus npm install -g elm@latest-0.19.1 as an alternative.

I also added a short "Build system notes" section to CONTRIBUTING.md covering the two things that cost me the most time: the Debug.elm symlink that the build rewrites (so switching between a dev and a prod build always leaves it dirty in git status), and the --optimize first pass in make-dev.sh that doubles as a check for live Debug calls. Both are neat, and both are invisible until you trip over them.

Everything here is prose in your voice as best I could match it, so please rewrite or drop anything that doesn't sound like you. Thanks again for giving this away for free.

🤖 Generated with Claude Code

Thank you for elk-herd, and for the code tour in CONTRIBUTING.md. It made finding my way around a 17k line Elm app far easier than I expected. I built it from source this week and ran into three small things. This is documentation plus a one character change in two shell scripts. No Elm was touched. **How to run the tests.** `tests/` has 125 passing tests, but nothing says how to run them, and the obvious invocations fail: `npx elm-test` and `elm-test@latest` now expect elm 0.19.2 and stop with `ELM VERSION MISMATCH`, while the `elm-test@0.19.1` tag is deprecated and runs nothing at all. `npx elm-test@0.19.1-revision17` works (125 passed, about 1.5s). Added as its own step in the README. **The build scripts need bash.** Both declare `#!/bin/sh` but use `function name { }`, and `make-prod.sh` also uses `local`. On macOS `/bin/sh` is bash, so this never shows. On Debian and Ubuntu `/bin/sh` is dash, and the script stops at `Syntax error: "}" unexpected`, which leaves no way to build from source there. Changed the shebang to `#!/bin/bash` in both. I checked the failure under dash, and rebuilt on macOS afterwards to confirm nothing changed there. **Elm 0.19.1 on Apple Silicon** is an x86_64 binary and needs Rosetta 2. One sentence, plus `npm install -g elm@latest-0.19.1` as an alternative. I also added a short "Build system notes" section to CONTRIBUTING.md covering the two things that cost me the most time: the `Debug.elm` symlink that the build rewrites (so switching between a dev and a prod build always leaves it dirty in `git status`), and the `--optimize` first pass in `make-dev.sh` that doubles as a check for live `Debug` calls. Both are neat, and both are invisible until you trip over them. Everything here is prose in your voice as best I could match it, so please rewrite or drop anything that doesn't sound like you. Thanks again for giving this away for free. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
mzero commented 2026-08-15 23:13:08 +02:00 (Migrated from github.com)

Please do not use Claude. If you're not going to take the time to write it... I don't want to take the time to review it.

It is too bad, as these changes seem useful.

Please do not use Claude. If you're not going to take the time to write it... I don't want to take the time to review it. It is too bad, as these changes seem useful.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin cdudek/docs/build-and-test-notes:cdudek/docs/build-and-test-notes
git switch cdudek/docs/build-and-test-notes

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff cdudek/docs/build-and-test-notes
git switch cdudek/docs/build-and-test-notes
git rebase main
git switch main
git merge --ff-only cdudek/docs/build-and-test-notes
git switch cdudek/docs/build-and-test-notes
git rebase main
git switch main
git merge --no-ff cdudek/docs/build-and-test-notes
git switch main
git merge --squash cdudek/docs/build-and-test-notes
git switch main
git merge --ff-only cdudek/docs/build-and-test-notes
git switch main
git merge cdudek/docs/build-and-test-notes
git push origin main
Sign in to join this conversation.
No description provided.