Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions src/dune_rules/dep_conf_eval.ml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ let package loc pkg_name (context : Build_context.t) ~dune_version =
}
;;

let project_dune_version expander =
Action_builder.of_memo
(let open Memo.O in
Dune_load.find_project ~dir:(Expander.dir expander) >>| Dune_project.dune_version)
;;

let rec dep expander : Dep_conf.t -> _ = function
| Include s ->
(* TODO this is wrong. we shouldn't allow bindings here if we are in an
Expand Down Expand Up @@ -297,13 +303,7 @@ let rec dep expander : Dep_conf.t -> _ = function
let* pkg_name = expand_package_name expander p in
let context = Build_context.create ~name:(Expander.context expander) in
let loc = String_with_vars.loc p in
let* dune_version =
Action_builder.of_memo
@@
let open Memo.O in
Dune_load.find_project ~dir:(Expander.dir expander)
>>| Dune_project.dune_version
in
let* dune_version = project_dune_version expander in
package loc pkg_name context ~dune_version
in
[])
Expand Down Expand Up @@ -353,12 +353,7 @@ and combined_package_deps_builder expander pkgs =
| Some (Local _) -> Action_builder.return ()
| Some (Build build) -> build
| Some (Installed _) | None ->
let* dune_version =
Action_builder.of_memo
(let open Memo.O in
Dune_load.find_project ~dir:(Expander.dir expander)
>>| Dune_project.dune_version)
in
let* dune_version = project_dune_version expander in
package loc pkg_name context ~dune_version)
in
env
Expand Down
Loading