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

[Preview] Upgrade to ocamlformat.0.19.0 #1474

Merged
merged 1 commit into from
Jul 26, 2021
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
2 changes: 1 addition & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 0.18.0
version = 0.19.0
profile = conventional
break-infix = fit-or-vertical
parse-docstrings = true
Expand Down
18 changes: 9 additions & 9 deletions bench/irmin-pack/trace_stat_summary_pp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,9 @@ module Table1 = struct
in

Pb.text row_name
::
(List.mapi pp_cell scalars
|> List.map Pb.text
|> List.map (Pb.align ~h:`Right ~v:`Top))
:: (List.mapi pp_cell scalars
|> List.map Pb.text
|> List.map (Pb.align ~h:`Right ~v:`Top))

let cells_of_section_row col_count (`Section name : section_row) =
Pb.text name
Expand All @@ -326,7 +325,7 @@ module Table2 = struct
let create_header_rows summaries =
let only_one_summary = List.length summaries = 1 in
[
"" :: (if only_one_summary then [] else [ "" ])
("" :: (if only_one_summary then [] else [ "" ]))
@ [ "min per block"; "max per block"; "avg per block"; "avg per sec" ];
]
|> Pb.matrix_to_text
Expand Down Expand Up @@ -459,7 +458,7 @@ module Table2 = struct
box_of_scalar scalar_format_b row_idx avg_ps0 avg_ps;
]
in
a :: b @ c)
(a :: b) @ c)
names_and_variables
in
rows
Expand All @@ -483,7 +482,8 @@ module Table3 = struct
let create_header_rows summaries =
let only_one_summary = List.length summaries = 1 in
[
"" :: (if only_one_summary then [] else [ "" ]) @ [ "min"; "max"; "avg" ];
("" :: (if only_one_summary then [] else [ "" ]))
@ [ "min"; "max"; "avg" ];
]
|> Pb.matrix_to_text
|> Pb.align_matrix `Center
Expand Down Expand Up @@ -590,7 +590,7 @@ module Table3 = struct
box_of_scalar scalar_format_b row_idx avg0 avg;
]
in
a :: b @ c)
(a :: b) @ c)
names_and_variables
in
rows
Expand Down Expand Up @@ -982,7 +982,7 @@ module Table4 = struct
let c =
List.mapi (box_of_scalar row_idx) (List.combine curve0 curve)
in
a :: b @ c)
(a :: b) @ c)
names_and_curves
in
rows
Expand Down
7 changes: 2 additions & 5 deletions examples/deploy.ml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ let provision repo =
in
let* v =
Store.Tree.add v [ "bin"; "sh" ]
"�����XpN ������� H__PAGEZERO(__TEXT__text__TEXT \
[...]"
"�����XpN ������� H__PAGEZERO(__TEXT__text__TEXT [...]"
in
Store.set_tree_exn t ~info:(provision "Cloning Ubuntu 14.04 Gold Image.") [] v

Expand Down Expand Up @@ -71,9 +70,7 @@ let attack repo =
let* () = Lwt_unix.sleep 2. in
Store.set_exn t
~info:(info "$ gcc -c /tmp/sh.c -o /bin/sh")
[ "bin"; "sh" ]
"�����XpNx ������� H__PAGEZERO(__TEXT__text__TEXT \
[...]"
[ "bin"; "sh" ] "�����XpNx ������� H__PAGEZERO(__TEXT__text__TEXT [...]"

let revert repo =
let* prod = Store.of_branch repo "prod" in
Expand Down
3 changes: 1 addition & 2 deletions examples/process.ml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ let rec watchdog () =
let () =
let aux () =
let* () = init () in
Lwt.choose
(watchdog () :: List.map (protect process) (Array.to_list images))
Lwt.choose (watchdog () :: List.map (protect process) (Array.to_list images))
in
Lwt_main.run (aux ())
10 changes: 5 additions & 5 deletions src/irmin-pack/irmin_pack_intf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ module type Sigs = sig
@param read_only whether read-only mode is enabled for this store.
@param lru_size the maximum number of bindings in the lru cache.
@param index_log_size the maximum number of bindings in the index cache.
@param index_throttle the strategy to use when the index cache is full and
an async [Index.merge] in already in progress. [Block_writes] (the
default) blocks any new writes until the merge is completed.
[Overcommit_memory] does not block but indefinitely expands the in-memory
cache. *)
@param index_throttle
the strategy to use when the index cache is full and an async
[Index.merge] in already in progress. [Block_writes] (the default)
blocks any new writes until the merge is completed. [Overcommit_memory]
does not block but indefinitely expands the in-memory cache. *)

exception RO_not_allowed

Expand Down
13 changes: 7 additions & 6 deletions src/irmin-pack/layered/irmin_pack_layered.mli
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ val config :

@param conf is an irmin-pack configuration.
@param lower_root is the root of the lower store, "lower" is the default.
@param upper_root1 is the root of one of the upper stores, "upper1" is the
default.
@param upper_root0 is the root of one of the upper stores, "upper0" is the
default.
@param upper_root1
is the root of one of the upper stores, "upper1" is the default.
@param upper_root0
is the root of one of the upper stores, "upper0" is the default.
@param with_lower if true (the default) use a lower layer during freezes.
@param blocking_copy_size specifies the maximum size (in bytes) that can be
copied in the blocking portion of the freeze. *)
@param blocking_copy_size
specifies the maximum size (in bytes) that can be copied in the blocking
portion of the freeze. *)

module type S = sig
include S.Store
Expand Down
9 changes: 5 additions & 4 deletions src/irmin/conf.mli
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ val key :
with a dot. [docv] is a meta-variable for representing the values of the key
(e.g. ["BOOL"] for a boolean).

@raise Invalid_argument if the key name is not made of a sequence of ASCII
lowercase letter, digit, dash or underscore.
@raise Invalid_argument
if the key name is not made of a sequence of ASCII lowercase letter,
digit, dash or underscore.

{b Warning.} No two keys should share the same [name] as this may lead to
difficulties in the UI. *)
{b Warning.} No two keys should share the same [name] as this may lead to
difficulties in the UI. *)

val name : 'a key -> string
(** The key name. *)
Expand Down
2 changes: 1 addition & 1 deletion src/irmin/object_graph.ml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ module Make (Hash : HASH) (Branch : Type.S) = struct
let* min =
Lwt_list.fold_left_s
(fun acc -> function
| `Branch _ as x -> pred x >|= fun c -> x :: c @ acc
| `Branch _ as x -> pred x >|= fun c -> (x :: c) @ acc
| x -> Lwt.return (x :: acc))
[] min
in
Expand Down
4 changes: 2 additions & 2 deletions src/irmin/tree_intf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ module type S = sig
val of_concrete : concrete -> t
(** [of_concrete c] is the subtree equivalent of the concrete tree [c].

@raise Invalid_argument if [c] contains duplicate bindings for a given
path. *)
@raise Invalid_argument
if [c] contains duplicate bindings for a given path. *)

val to_concrete : t -> concrete Lwt.t
(** [to_concrete t] is the concrete tree equivalent of the subtree [t]. *)
Expand Down