My aggregated monorepo of OCaml code, automaintained
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

day11: fix solver_worker binary lookup via PATH

The solver_pool now uses 'which day11-solver-worker' to find the
binary via PATH, in addition to the existing relative path checks.
This fixes finding the worker when day11 is installed via opam
rather than built locally.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+10 -1
+10 -1
day11/solver_pool/solver_pool.ml
··· 7 7 "_build/default/day11/solver/solver_worker.exe"; 8 8 "day11-solver-worker"; 9 9 ] in 10 - match List.find_opt Sys.file_exists candidates with 10 + (* Also check PATH via 'which' *) 11 + let from_path = 12 + let ic = Unix.open_process_in "which day11-solver-worker 2>/dev/null" in 13 + let path = try Some (String.trim (input_line ic)) with _ -> None in 14 + ignore (Unix.close_process_in ic); 15 + path 16 + in 17 + let all_candidates = candidates @ 18 + (match from_path with Some p -> [p] | None -> []) in 19 + match List.find_opt Sys.file_exists all_candidates with 11 20 | Some p -> p 12 21 | None -> 13 22 let tried = String.concat ", " candidates in