Anchor read_example to the source root #37

Closed
opened 2026-07-03 00:40:41 +00:00 by toph · 0 comments
Owner

tests/test_e2e.ml and the fold_state example test read ../../../examples/ relative to cwd. Under dune runtest that resolves correctly, but running a test binary via dune exec tests/... from an in-repo worktree root silently reads the main checkout's examples — during the def/apply slice this produced the same phantom failure three times (bisect-a.bel: unexpected character, old syntax from the other checkout).

Anchor the path to the source root instead, e.g. via a dune %{workspace_root} env value or DUNE_SOURCEROOT.

Follow-up to #35.

tests/test_e2e.ml and the fold_state example test read `../../../examples/` relative to cwd. Under `dune runtest` that resolves correctly, but running a test binary via `dune exec tests/...` from an in-repo worktree root silently reads the *main checkout's* examples — during the def/apply slice this produced the same phantom failure three times (`bisect-a.bel: unexpected character`, old syntax from the other checkout). Anchor the path to the source root instead, e.g. via a dune `%{workspace_root}` env value or `DUNE_SOURCEROOT`. Follow-up to #35.
toph closed this issue 2026-07-03 18:57:29 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
toph/beloch#37
No description provided.