File tree Expand file tree Collapse file tree 8 files changed +24
-2
lines changed
Expand file tree Collapse file tree 8 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ let solve ~dev_tool ~local_packages =
7878 let lock_dir = Lock_dir. dev_tool_lock_dir_path dev_tool in
7979 Memo. of_reproducible_fiber
8080 @@ Lock. solve
81- workspace
81+ ( Workspace. add_repo workspace Dune_pkg.Pkg_workspace.Repository. binary_packages)
8282 ~local_packages
8383 ~project_sources: Dune_pkg.Pin_stanza.DB. empty
8484 ~solver_env_from_current_system
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ let repositories_of_lock_dir workspace ~lock_dir_path =
6262 match Workspace. find_lock_dir workspace lock_dir_path with
6363 | Some lock_dir -> lock_dir.repositories
6464 | None ->
65- List. map Workspace. default_repositories ~f: (fun repo ->
65+ List. map workspace.repos ~f: (fun repo ->
6666 let name = Dune_pkg.Pkg_workspace.Repository. name repo in
6767 let loc = Loc. none in
6868 loc, name)
Original file line number Diff line number Diff line change @@ -47,6 +47,14 @@ type t =
4747 ; serializable : Serializable .t option
4848 }
4949
50+ let to_dyn { source; loc; serializable } =
51+ Dyn. record
52+ [ " source" , Source_backend. to_dyn source
53+ ; " loc" , Loc. to_dyn loc
54+ ; " serializable" , Dyn. option Serializable. to_dyn serializable
55+ ]
56+ ;;
57+
5058let equal { source; serializable; loc } t =
5159 Source_backend. equal source t.source
5260 && Option. equal Serializable. equal serializable t.serializable
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ module Serializable : sig
1111 val to_dyn : t -> Dyn .t
1212end
1313
14+ val to_dyn : t -> Dyn .t
1415val equal : t -> t -> bool
1516
1617(* * [of_opam_repo_dir_path opam_repo_dir] creates a repo represented by a local
Original file line number Diff line number Diff line change @@ -52,6 +52,15 @@ module Repository = struct
5252 }
5353 ;;
5454
55+ let binary_packages =
56+ { name = " binary-packages"
57+ ; source =
58+ ( Loc. none
59+ , OpamUrl. of_string " git+https://github.com/ocaml-dune/ocaml-binary-packages.git"
60+ )
61+ }
62+ ;;
63+
5564 let decode =
5665 let open Decoder in
5766 fields
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ module Repository : sig
99 val equal : t -> t -> bool
1010 val upstream : t
1111 val overlay : t
12+ val binary_packages : t
1213 val decode : t Decoder .t
1314
1415 module Name : sig
Original file line number Diff line number Diff line change @@ -682,6 +682,8 @@ let find_lock_dir t path =
682682 List. find t.lock_dirs ~f: (fun lock_dir -> Path.Source. equal lock_dir.path path)
683683;;
684684
685+ let add_repo t repo = { t with repos = repo :: t .repos }
686+
685687include Dune_lang.Versioned_file. Make (struct
686688 type t = unit
687689 end )
Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ val equal : t -> t -> bool
124124val to_dyn : t -> Dyn .t
125125val hash : t -> int
126126val find_lock_dir : t -> Path.Source .t -> Lock_dir .t option
127+ val add_repo : t -> Dune_pkg.Pkg_workspace.Repository .t -> t
127128val default_repositories : Dune_pkg.Pkg_workspace.Repository .t list
128129
129130module Clflags : sig
You can’t perform that action at this time.
0 commit comments