From 252dbe92d34db33d137c2722e62b02a20ebf6078 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 21 Jan 2025 23:02:15 +0000 Subject: [PATCH] refactor: Use [conflict_class] in simplified rep (#11369) Signed-off-by: Rudi Grinberg --- src/dune_pkg/opam_solver.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dune_pkg/opam_solver.ml b/src/dune_pkg/opam_solver.ml index fa9f17ff72f..e638e04d31b 100644 --- a/src/dune_pkg/opam_solver.ml +++ b/src/dune_pkg/opam_solver.ml @@ -315,7 +315,7 @@ module Solver = struct and real_impl = { pkg : OpamPackage.t - ; opam : OpamFile.OPAM.t + ; conflict_class : OpamPackage.Name.t list ; requires : dependency list } @@ -414,7 +414,7 @@ module Solver = struct ;; let conflict_class = function - | RealImpl impl -> OpamFile.OPAM.conflict_class impl.opam + | RealImpl impl -> impl.conflict_class | VirtualImpl _ -> [] | Dummy | Reject _ -> [] ;; @@ -536,7 +536,8 @@ module Solver = struct make_deps Ensure ensure OpamFile.OPAM.depends @ make_deps Prevent prevent OpamFile.OPAM.conflicts in - Some (RealImpl { pkg; opam; requires })) + let conflict_class = OpamFile.OPAM.conflict_class opam in + Some (RealImpl { pkg; requires; conflict_class })) ;; let meets_restriction impl { Restriction.kind; expr } =