Skip to content

Commit

Permalink
CUDF preprocessing: add an OPAMDIGDEPTH debug variable
Browse files Browse the repository at this point in the history
Determines how far we go through the dependencies of the specified packages to
extract conflicts. Defaults to 2, 0 disables conflict detection, more than 5 is
probably meaningless.

Higher values make the preprocessing take around 2s, but that could probably be
optimised.
  • Loading branch information
AltGr committed Sep 24, 2020
1 parent 8479bc9 commit 1faf7e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/solver/opamCudf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,11 @@ let preprocess_cudf_request (props, univ, creq) =
in
let cache = Hashtbl.create 513 in
(* Don't explore deeper than that for transitive conflicts *)
let max_dig_depth = 2 in
let max_dig_depth =
match OpamStd.Config.env_int "DIGDEPTH" with
| None -> 2
| Some i -> i
in
let rec transitive_conflicts seen p =
(* OpamConsole.msg "%s\n" (Package.to_string p); *)
try Hashtbl.find cache p with Not_found ->
Expand Down

0 comments on commit 1faf7e4

Please # to comment.