Skip to content

Commit 66f3509

Browse files
hyperpolymathclaude
andcommitted
fix(build): track bin/dune (executable definition) — fix gitignore negation
CI's `Run codegen WASM tests` step was failing with `Program 'affinescript' not found!` because the test runner couldn't locate the compiled binary. The cause: `bin/dune` was never tracked. Root cause was a gitignore semantics issue. The .gitignore had: /bin/ !bin/*.ml !bin/dune `/bin/` excludes the directory itself. Per git docs, "It is not possible to re-include a file if a parent directory of that file is excluded" — so `!bin/*.ml` and `!bin/dune` were silent no-ops. `bin/main.ml` happened to be tracked from before the gitignore rule was added, but `bin/dune` was never tracked, so origin's `bin/` had only main.ml and dune saw no executable to build. Fix: change `/bin/` to `/bin/*` (excludes contents, not the directory) so the negations actually re-include their targets. Also force-added `bin/dune` (the executable definition: `(executable (name main) (public_name affinescript) (package affinescript) (libraries affinescript cmdliner fmt fmt.tty))`) so origin gets it for the first time. After this lands, `dune build` produces `_build/default/bin/main.exe` and the codegen test runner's first compiler-detection branch hits. Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
1 parent 947dc30 commit 66f3509

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ __pycache__/
5151
# Ada/SPARK
5252
*.ali
5353
/obj/
54-
/bin/
54+
# `/bin/` excludes the directory itself, which makes git unable to re-include
55+
# files inside it (negations can't re-include children of an excluded dir).
56+
# `/bin/*` excludes the *contents* so `!bin/*.ml` and `!bin/dune` actually
57+
# re-include their targets. The previous `/bin/` form silently dropped
58+
# bin/dune from origin and broke CI's executable build.
59+
/bin/*
5560
!bin/*.ml
5661
!bin/dune
5762

bin/dune

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
; SPDX-License-Identifier: MIT OR AGPL-3.0-or-later
2+
3+
(executable
4+
(name main)
5+
(public_name affinescript)
6+
(package affinescript)
7+
(libraries affinescript cmdliner fmt fmt.tty))

0 commit comments

Comments
 (0)