dune icon indicating copy to clipboard operation
dune copied to clipboard

support recursive enable_if in tests

Open samoht opened this issue 1 year ago • 1 comments

Using an enabled_if library in a test stanza protected by an enabled_if is not supported while it is for tests.

For instance https://github.com/ocaml-multicore/eio/blob/6a85b668a7cf75efcd304cba0fadabc0e2866b03/lib_eio_linux/tests/dune#L25-L30

On macOS This will fail with:

❯ dune build
File "lib_eio_linux/tests/dune", line 30, characters 21-30:
30 |  (libraries alcotest eio_linux))
                          ^^^^^^^^^
Error: Library "eio_linux" in _build/default/lib_eio_linux is hidden
(unsatisfied 'enabled_if').
-> required by _build/default/lib_eio_linux/tests/test.bc
-> required by alias lib_eio_linux/tests/all
-> required by alias default

Changing the test into executable works.

samoht avatar Sep 07 '22 15:09 samoht

Duplicate of #5505

emillon avatar Sep 09 '22 12:09 emillon