Skip to content

Commit

Permalink
refactor: load opam files in concurrently
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>

<!-- ps-id: 28bc84bb-3481-43e8-ac8c-0737cb2bcc43 -->

Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Feb 3, 2025
1 parent 550c00e commit 7b9c153
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dune_pkg/opam_solver.ml
Original file line number Diff line number Diff line change
Expand Up @@ -710,13 +710,13 @@ module Solver = struct
clause)
in
let+ () =
Fiber.sequential_iter !impls ~f:(fun { var = impl_var; impl } ->
Fiber.parallel_iter !impls ~f:(fun { var = impl_var; impl } ->
Conflict_classes.process conflict_classes impl_var impl;
match expand_deps with
| `No_expand -> Fiber.return ()
| `Expand_and_collect_conflicts deferred ->
Input.Impl.requires role impl
|> Fiber.sequential_iter ~f:(fun (dep : Input.dependency) ->
|> Fiber.parallel_iter ~f:(fun (dep : Input.dependency) ->
match dep.importance with
| Ensure -> process_dep expand_deps impl_var dep
| Prevent ->
Expand Down Expand Up @@ -778,7 +778,7 @@ module Solver = struct
restricting dependencies are irrelevant to solving the dependency
problem. *)
List.rev !conflicts
|> Fiber.sequential_iter ~f:(fun (impl_var, dep) ->
|> Fiber.parallel_iter ~f:(fun (impl_var, dep) ->
process_dep `No_expand impl_var dep)
(* All impl_candidates have now been added, so snapshot the cache. *)
in
Expand Down

0 comments on commit 7b9c153

Please sign in to comment.