enabled_if
field does not support environment variables on executable stanza
#10905
Labels
enabled_if
field does not support environment variables on executable stanza
#10905
In the docs, it is claimed that the field
enabled_if
behaves for executables the same as libraries. As of dune 3.15,enabled_if
should allow to enable/disable a library (and therefore executable) based on environment variables.Expected Behavior
Given a directory with
dune-project
file:dune
file:and files
main.ml
andmain_2.ml
(omitted as irrelevant), runningdune build
should result in producing eithermain.exe
, or bothmain.exe
andmain_2.exe
, based on the value of$MYVAR
.Actual Behavior
dune build
fails with the following error:Note that
dune-project
already states(lang dune 3.15)
. Setting the language version to 3.16 results in the same error.Also note that the same
enabled_if
expression has the desired effect if used onlibrary
.Specifications
dune
: 3.16.0ocaml
: 4.12.1The text was updated successfully, but these errors were encountered: