Skip to content

Commit 271de14

Browse files
authored
refactor: leave CR (ocaml#11448)
Signed-off-by: Rudi Grinberg <[email protected]>
1 parent d50209c commit 271de14

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/dune_pkg/opam_solver.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,9 @@ module Solver = struct
474474

475475
let compare_version a b =
476476
match a, b with
477-
| RealImpl a, RealImpl b -> Ordering.of_int (OpamPackage.compare a.pkg b.pkg)
477+
| RealImpl a, RealImpl b ->
478+
(* CR rgrinberg: shouldn't we take our version preference into account here? *)
479+
Ordering.of_int (OpamPackage.compare a.pkg b.pkg)
478480
| RealImpl _, _ -> Gt
479481
| _, RealImpl _ -> Lt
480482
| VirtualImpl (ia, _), VirtualImpl (ib, _) -> Rank.compare ia ib
@@ -941,6 +943,7 @@ module Solver = struct
941943
If [t] selected a better version anyway then we don't need to report this rejection. *)
942944
let affected_selection t impl =
943945
match t.selected_impl with
946+
(* CR rgrinberg: take account version preference here? *)
944947
| Some selected when Input.Impl.compare_version selected impl = Gt -> false
945948
| _ -> true
946949
;;

0 commit comments

Comments
 (0)