Commit 8d515b3
docs(readme): make build prereqs reproducible from a clean checkout (#112)
The README's "Prerequisites" section listed five opam packages
(sedlex, menhir, ppx_deriving, cmdliner, yojson) — half the real dep
set. Running `dune build` on a fresh switch with only those five
installed fails at `js/playground.bc.js` because `js_of_ocaml`,
`js_of_ocaml-ppx`, and `js_of_ocaml-compiler` are also required.
Likewise `ppx_sexp_conv`, `sexplib0`, `fmt`, `alcotest`, and
`ocamlformat` are pulled in by `lib/`, `test/`, and the format target,
but were undocumented.
Changes:
- Expand the prereqs list to match `dune-project`'s `depends` block
exactly (including the `with-test` packages).
- Add a one-shot `opam install` snippet so a fresh switch can be
provisioned in a single command.
- Add an `eval "$(opam env ...)"` note explaining why non-interactive
login shells (e.g. `wsl bash -lc ...`) do not see `dune` on PATH
after `opam install`: opam-init/init.sh gates PATH-setup behind
`[ -t 0 ]`, so persistent wiring has to be done by hand in `~/.profile`.
- Note the `dune build lib/ bin/ test/` fallback for contributors who
do not want the JS playground deps.
- Flag the OCaml version drift: `dune-project` constrains `>= 5.1` but
the current tree also builds clean on 4.14.2 (209/209 tests pass).
Documented as an observation, not bumped — the constraint deserves a
judgement call from a maintainer, not a unilateral relaxation.
Verified end-to-end: clean clone → `opam install -y` snippet → `eval
$(opam env)` → `dune build` (exit 0) → `dune runtest` (209/209 green).
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent 49a3914 commit 8d515b3
1 file changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | | - | |
| 390 | + | |
391 | 391 | | |
392 | | - | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
393 | 419 | | |
394 | 420 | | |
395 | 421 | | |
| |||
0 commit comments