Skip to content

Commit

Permalink
fix: enabled_if with dune describe
Browse files Browse the repository at this point in the history
Fixes ocaml#10779.

Signed-off-by: Alpha DIALLO <[email protected]>
  • Loading branch information
moyodiallo committed Sep 9, 2024
1 parent 83f6e1c commit 7e548f2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
9 changes: 7 additions & 2 deletions bin/describe/describe_workspace.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit 7e548f2

Please sign in to comment.