Skip to content

Commit

Permalink
Merge pull request ocaml#1982 from rgrinberg/assert-js-targets-ctx
Browse files Browse the repository at this point in the history
Make sure that all js_targets are in ctx_dir
  • Loading branch information
rgrinberg authored Mar 27, 2019
2 parents b137621 + aeca289 commit c3a811f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gen_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ module Gen(P : sig val sctx : Super_context.t end) = struct
let open Sexp.Encoder in
constr "exclude" (List.map ~f:Path.to_sexp js_targets)
) in
List.iter js_targets ~f:(fun js_target ->
assert (Path.equal (Path.parent_exn js_target) ctx_dir));
Predicate.create ~id ~f:(fun basename ->
not (List.exists js_targets ~f:(fun js_target ->
String.equal (Path.basename js_target) basename)))
Expand Down

0 comments on commit c3a811f

Please sign in to comment.