Skip to content
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 bin/ir_cli.ml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ let depth =
Arg.(value & opt (some int) None & doc)

let run t =
Lwt_unix.run (
Lwt_main.run (
catch
(fun () -> t)
(function e -> eprintf "%s\n%!" (Printexc.to_string e); exit 1)
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_merge.ml
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,4 @@ let main () =
print_logs "merge" t

let () =
Lwt_unix.run (main ())
Lwt_main.run (main ())
8 changes: 4 additions & 4 deletions examples/deploy.ml
Original file line number Diff line number Diff line change
Expand Up @@ -109,24 +109,24 @@ let () =
else match Sys.argv.(1) with

| "provision" ->
Lwt_unix.run (Store.Repo.create config >>= provision);
Lwt_main.run (Store.Repo.create config >>= provision);
Printf.printf
"The VM is now provisioned. Run `%s configure` to simulate a sysadmin \n\
configuration.\n" cmd

| "configure" ->
Lwt_unix.run (Store.Repo.create config >>= configure);
Lwt_main.run (Store.Repo.create config >>= configure);
Printf.printf
"The VM is now configured. Run `%s attack` to simulate an attack by an \n\
intruder.\n" cmd

| "attack" ->
Lwt_unix.run (Store.Repo.create config >>= attack);
Lwt_main.run (Store.Repo.create config >>= attack);
Printf.printf
"The VM has been attacked. Run `%s revert` to revert the VM state to a \
safe one.\n" cmd

| "revert" ->
Lwt_unix.run (Store.Repo.create config >>= revert)
Lwt_main.run (Store.Repo.create config >>= revert)

| _ -> help ()
2 changes: 1 addition & 1 deletion examples/git_store.ml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ let () =
"This example creates a Git repository in %s and use it to read \n\
and write data:\n" Config.root;
let _ = Sys.command (Printf.sprintf "rm -rf %s" Config.root) in
Lwt_unix.run (main ());
Lwt_main.run (main ());
Printf.printf
"You can now run `cd %s && tig` to inspect the store.\n" Config.root;
2 changes: 1 addition & 1 deletion examples/process.ml
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ let () =
init () >>= fun () ->
Lwt.join (watchdog () :: List.map (protect process) (Array.to_list images))
in
Lwt_unix.run (aux ())
Lwt_main.run (aux ())
2 changes: 1 addition & 1 deletion examples/views.ml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ let main () =
return_unit

let () =
Lwt_unix.run (main ())
Lwt_main.run (main ())
2 changes: 1 addition & 1 deletion lib/irmin.mli
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,7 @@ let () =
) fmt

let () =
Lwt_unix.run begin
Lwt_main.run begin
S.Repo.create config >>= S.master task
>>= fun t -> log t "Adding a new log entry"
>>= fun () -> Irmin.clone_force task (t "Cloning the store") "x"
Expand Down
4 changes: 2 additions & 2 deletions lib_test/test_store.ml
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ module Make (S: Test_S) = struct
History.create (h repo) ~node:kn3 ~parents:[kr1] ~task:Irmin.Task.empty

let run x test =
try Lwt_unix.run (x.init () >>= fun () -> S.Repo.create x.config >>= fun repo -> test repo >>= x.clean)
try Lwt_main.run (x.init () >>= fun () -> S.Repo.create x.config >>= fun repo -> test repo >>= x.clean)
with e ->
Lwt_unix.run (x.clean ());
Lwt_main.run (x.clean ());
raise e

let random_value x value =
Expand Down