Skip to content

Commit

Permalink
stop recording deps in Action_builder.contents
Browse files Browse the repository at this point in the history
PR ocaml#9552 changed the semantics of Action_builder.contents so that it
records a dependency. The Coq rules were relying on the previous
behaviour of not recording a dependency in order to generate a build
plan. This caused issue ocaml#10149 to appear.

This PR fixes ocaml#10149 by removing the dependency being recorded in
Action_builder.contents matching the previous semantics.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
  • Loading branch information
Alizter committed Apr 20, 2024
1 parent adb9d9f commit da0b0f6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions src/dune_rules/action_builder.ml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@ let paths ps = deps (Dep.Set.of_files ps)
let path_set ps = deps (Dep.Set.of_files_set ps)
let dyn_paths paths = dyn_deps (paths >>| fun (x, paths) -> x, Dep.Set.of_files paths)
let dyn_paths_unit paths = dyn_deps (paths >>| fun paths -> (), Dep.Set.of_files paths)

let contents p =
let* () = Dep.file p |> Dep.Set.singleton |> Build_system.record_deps in
of_memo (Build_system.read_file p)
;;

let contents p = of_memo (Build_system.read_file p)
let lines_of p = contents p >>| String.split_lines

let read_sexp p =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ coqdep is changed.
Currently this is the case and a bug:
$ dune build --display=short
coqdep .bug.theory.d
coqc root.{glob,vo}
coqc leaf.{glob,vo}

0 comments on commit da0b0f6

Please sign in to comment.