diff --git a/bin/describe/describe_workspace.ml b/bin/describe/describe_workspace.ml index f405e0c9861..08278c0be1a 100644 --- a/bin/describe/describe_workspace.ml +++ b/bin/describe/describe_workspace.ml @@ -562,8 +562,13 @@ module Crawl = struct (Context.build_dir context) (Dune_file.dir dune_file) in - let project = Dune_file.project dune_file in - executables sctx ~options ~project ~dir exes + let* expander = Super_context.expander sctx ~dir in + Expander.eval_blang expander exes.enabled_if + >>= (function + | false -> Memo.return None + | true -> + let project = Dune_file.project dune_file in + executables sctx ~options ~project ~dir exes) | _ -> Memo.return None) >>| List.filter_opt) >>| List.concat diff --git a/test/blackbox-tests/test-cases/enabled_if/eif-dune-describe-crash.t b/test/blackbox-tests/test-cases/enabled_if/eif-dune-describe.t similarity index 61% rename from test/blackbox-tests/test-cases/enabled_if/eif-dune-describe-crash.t rename to test/blackbox-tests/test-cases/enabled_if/eif-dune-describe.t index 273b7a7a82a..edaa41ca97e 100644 --- a/test/blackbox-tests/test-cases/enabled_if/eif-dune-describe-crash.t +++ b/test/blackbox-tests/test-cases/enabled_if/eif-dune-describe.t @@ -24,9 +24,7 @@ $ dune build $ dune runtest - $ dune describe 2>&1 | head -n 5 - Internal error, please report upstream including the contents of _build/log. - Description: - ("modules_and_obj_dir: failed lookup", - { keys = []; for_ = Exe { first_exe = "test" } }) - Raised at Stdune__Code_error.raise in file + $ dune describe 2>&1 + ((root + $TESTCASE_ROOT) + (build_context _build/default))