I ran into what looks like a bug to me: an executable depends on a library including a module with the same name as another executable that gets linked to the main program even if it’s not used at all. Is it the expected behavior?
Here’s a minimal example:
(executables (names test m) (libraries lib))
let answer = 42
let () = print_endline "m"
open Lib let () = ignore M.answer; print_endline "test"