Skip to content

enabled_if not masking a library target #5505

@avsm

Description

@avsm

eio has the following dune file frag:

(test
 (name test)
 (package eio_linux)
 (enabled_if (= %{system} "linux"))
 (modules test)
 (libraries alcotest eio_linux))

doing a build on macos results in this error:

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

cc @talex5 @patricoferris

It would be good if the exists_if in the dune file stops the library target from being attempted to be resolved.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions