Skip to content

Commit

Permalink
fix(engine/deps): fix inverted behavior for including dependencies
Browse files Browse the repository at this point in the history
I introduced a bug in #470: a
negative `-i` clause would drop not only the matching items but any
items they rely on!
This resulted in an extremely confusing behavior...
  • Loading branch information
W95Psp committed Jan 31, 2024
1 parent 2d9ea5f commit 031633f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions engine/lib/dependencies.ml
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,11 @@ module Make (F : Features.T) = struct
let apply_clause selection' (clause : Types.inclusion_clause) =
let matches = Concrete_ident.matches_namespace clause.Types.namespace in
let matched = Set.filter ~f:matches selection in
let without_deps =
[%matches? (Included { strict = true } : Types.inclusion_kind)]
let with_deps =
[%matches? (Included { strict = false } : Types.inclusion_kind)]
clause.kind
in
let matched = matched |> if without_deps then Fn.id else deps_of in
let matched = matched |> if with_deps then deps_of else Fn.id in
Logs.info (fun m ->
m "The clause [%s] will %s the following Rust items:\n%s"
(show_inclusion_clause clause)
Expand Down

0 comments on commit 031633f

Please sign in to comment.