File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1116,6 +1116,10 @@ let to_dyn
11161116 ]
11171117;;
11181118
1119+ (* CR-someday Alizter: Remove this when portable lock directories are
1120+ consolidated with non-portable lock directories. *)
1121+ let uses_versioned_paths t = not (List. is_empty (snd t.solved_for_platforms))
1122+
11191123type missing_dependency =
11201124 { dependant_package : Pkg .t
11211125 ; dependency : Package_name .t
Original file line number Diff line number Diff line change @@ -117,6 +117,11 @@ val remove_locs : t -> t
117117val equal : t -> t -> bool
118118val to_dyn : t -> Dyn .t
119119
120+ (* * Returns whether this lock directory uses versioned paths for package
121+ files directories. Portable lock directories use versioned paths to
122+ handle multiple versions of the same package. *)
123+ val uses_versioned_paths : t -> bool
124+
120125(* * [create_latest_version packages ~ocaml ~repos
121126 ~expanded_solver_variable_bindings] raises a [Code_error] if [packages] is
122127 not closed under the "depends on" relationship between packages. Every
Original file line number Diff line number Diff line change @@ -1530,10 +1530,10 @@ end = struct
15301530 and + files_dir =
15311531 let + lock_dir_path =
15321532 Package_universe. lock_dir_path package_universe >> | Option. value_exn
1533- and + { solved_for_platforms = _, platforms; _ } =
1534- Package_universe. lock_dir package_universe
1533+ and + lock_dir = Package_universe. lock_dir package_universe in
1534+ let version =
1535+ Option. some_if (Dune_pkg.Lock_dir. uses_versioned_paths lock_dir) info.version
15351536 in
1536- let version = Option. some_if (not (List. is_empty platforms)) info.version in
15371537 Dune_pkg.Lock_dir.Pkg. files_dir info.name version ~lock_dir: lock_dir_path
15381538 |> Path. as_in_build_dir_exn
15391539 in
You can’t perform that action at this time.
0 commit comments