Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dune 3 fixes #187

Merged
merged 7 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
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
Empty file removed bin/admin.mli
Empty file.
Empty file removed bin/client.mli
Empty file.
8 changes: 0 additions & 8 deletions bin/scheduler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,6 @@ let pools =
~docv:"POOLS"
["pools"]

let capnp_address =
Arg.value @@
Arg.opt (Arg.some Capnp_rpc_unix.Network.Location.cmdliner_conv) None @@
Arg.info
~doc:"Public address (SCHEME:HOST:PORT) for Cap'n Proto RPC (default: no RPC)"
~docv:"ADDR"
["capnp-address"]

let secrets_dir =
Arg.required @@
Arg.(opt (some dir)) (Some "./capnp-secrets") @@
Expand Down
2 changes: 1 addition & 1 deletion current_ocluster.opam
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors: ["talex5@gmail.com"]
homepage: "https://github.com/ocurrent/ocluster"
bug-reports: "https://github.com/ocurrent/ocluster/issues"
depends: [
"dune" {>= "2.8"}
"dune" {>= "3.3"}
"ppx_deriving"
"ocluster-api" {= version}
"lwt" {>= "5.6.1"}
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 2.8)
(lang dune 3.3)
(name ocluster)
(formatting disabled)
(generate_opam_files true)
Expand Down
2 changes: 1 addition & 1 deletion ocluster-api.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors: ["talex5@gmail.com"]
homepage: "https://github.com/ocurrent/ocluster"
bug-reports: "https://github.com/ocurrent/ocluster/issues"
depends: [
"dune" {>= "2.8"}
"dune" {>= "3.3"}
"ppx_deriving"
"lwt" {>= "5.6.1"}
"capnp-rpc-lwt" {>= "1.2"}
Expand Down
2 changes: 1 addition & 1 deletion ocluster.opam
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ authors: ["talex5@gmail.com"]
homepage: "https://github.com/ocurrent/ocluster"
bug-reports: "https://github.com/ocurrent/ocluster/issues"
depends: [
"dune" {>= "2.8"}
"dune" {>= "3.3"}
"ppx_expect" {>= "v0.14.1"}
"prometheus"
"ppx_sexp_conv"
Expand Down
2 changes: 1 addition & 1 deletion scheduler/pool.ml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ module Make (Item : S.ITEM)(Time : S.TIME) = struct
mutable workers : worker Worker_map.t; (* Connected workers *)
mutable clients : client_info Client_map.t;
mutable cluster_capacity : float;
mutable pending_cached : (Item.cache_hint, int) Hashtbl.t;
pending_cached : (Item.cache_hint, int) Hashtbl.t;
} and worker = {
parent : t;
name : string;
Expand Down
4 changes: 2 additions & 2 deletions scheduler/pool.mli
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module Inactive_reasons : sig
val pp : t Fmt.t
end

module Make (Item : S.ITEM) (Time : S.TIME) : sig
module Make (Item : S.ITEM) (_ : S.TIME) : sig
type t
(** A pool of workers and queued jobs. *)

Expand Down Expand Up @@ -115,7 +115,7 @@ module Make (Item : S.ITEM) (Time : S.TIME) : sig

val with_worker : t -> string -> (worker -> 'a) -> 'a
(** [with_worker t name f] is [f worker] if [worker] is in [connected_workers].
If not, it temporarily registers it, runs [f], and then releases it. *)
If not, it temporarily registers it, runs [f], and then releases it. *)

val worker_known : t -> string -> bool
(** [worker_known t name] is [true] when worker [name] has previously registered with this pool,
Expand Down
Empty file removed stress/stress.mli
Empty file.
Empty file removed test/test.mli
Empty file.
2 changes: 1 addition & 1 deletion test/test_scheduling.ml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ let job_state x =
| Sleep -> Error "pending"

let pp_result = Fmt.(result ~ok:string ~error:string)
let pp_cancel = Fmt.(result ~ok:(const string "cancelled") ~error:(const string "error"))
let pp_cancel ppf = Fmt.(result ~ok:(const string "cancelled") ~error:(const string "error")) ppf

let println fmt = Fmt.pr (fmt ^^ "@.")
let print_result = Fmt.pr "%a@." pp_result
Expand Down
Empty file removed test/test_scheduling.mli
Empty file.