Skip to content

support recursive enable_if in tests #6132

@samoht

Description

@samoht

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions