From 235904ed419e575ee64c4801cf9246b4a71cb39f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Tue, 22 Mar 2022 14:52:26 +0100 Subject: [PATCH 1/5] Error_monad: move legacy globals into a separate namespace --- src/lib_error_monad/error_monad.ml | 6 ++- src/lib_error_monad/monad_extension_maker.ml | 54 ++++++++++++-------- src/lib_error_monad/sig.ml | 47 ++++++++--------- 3 files changed, 60 insertions(+), 47 deletions(-) diff --git a/src/lib_error_monad/error_monad.ml b/src/lib_error_monad/error_monad.ml index 6be41cd9c9b4..48bfebdb3562 100644 --- a/src/lib_error_monad/error_monad.ml +++ b/src/lib_error_monad/error_monad.ml @@ -59,9 +59,11 @@ let () = | _ -> None) (fun msg -> Exn (Failure msg)) -let error_with fmt = Format.kasprintf (fun s -> error (Exn (Failure s))) fmt +let error_with fmt = + Format.kasprintf (fun s -> Tzresult_syntax.fail (Exn (Failure s))) fmt -let failwith fmt = Format.kasprintf (fun s -> fail (Exn (Failure s))) fmt +let failwith fmt = + Format.kasprintf (fun s -> Lwt_tzresult_syntax.fail (Exn (Failure s))) fmt let error_of_exn e = Exn e diff --git a/src/lib_error_monad/monad_extension_maker.ml b/src/lib_error_monad/monad_extension_maker.ml index bc90a4bfde14..816599d14c37 100644 --- a/src/lib_error_monad/monad_extension_maker.ml +++ b/src/lib_error_monad/monad_extension_maker.ml @@ -34,32 +34,34 @@ end) Sig.MONAD_EXTENSION with type error := Error.error and type 'error trace := 'error Trace.trace = struct - (* we default to exposing the combined monad syntax everywhere. - We do the bulk of this by including [Lwt_traced_result_syntax] directly. *) - include Monad.Lwt_traced_result_syntax + module Legacy_monad_globals = struct + (* we default to exposing the combined monad syntax everywhere. + We do the bulk of this by including [Lwt_traced_result_syntax] directly. *) + include Monad.Lwt_traced_result_syntax - (* Some globals that Lwtreslib does not expose but that the Tezos code uses a - lot. *) - let ( >>= ) = Monad.Lwt_syntax.( let* ) + (* Some globals that Lwtreslib does not expose but that the Tezos code uses a + lot. *) + let ( >>= ) = Monad.Lwt_syntax.( let* ) - let ( >|= ) = Monad.Lwt_syntax.( let+ ) + let ( >|= ) = Monad.Lwt_syntax.( let+ ) - let ( >>? ) = Monad.Result_syntax.( let* ) + let ( >>? ) = Monad.Result_syntax.( let* ) - let ( >|? ) = Monad.Result_syntax.( let+ ) + let ( >|? ) = Monad.Result_syntax.( let+ ) - let ok = Monad.Result_syntax.return + let ok = Monad.Result_syntax.return - let error = Monad.Traced_result_syntax.fail + let error = Monad.Traced_result_syntax.fail - let ( >>=? ) = Monad.Lwt_result_syntax.( let* ) + let ( >>=? ) = Monad.Lwt_result_syntax.( let* ) - let ( >|=? ) = Monad.Lwt_result_syntax.( let+ ) + let ( >|=? ) = Monad.Lwt_result_syntax.( let+ ) - let ( >>?= ) = Monad.Lwt_result_syntax.( let*? ) + let ( >>?= ) = Monad.Lwt_result_syntax.( let*? ) - let ( >|?= ) r f = - match r with Error _ as e -> Lwt.return e | Ok o -> Lwt_result.ok (f o) + let ( >|?= ) r f = + match r with Error _ as e -> Lwt.return e | Ok o -> Lwt_result.ok (f o) + end (* default (traced-everywhere) helper types *) type tztrace = Error.error Trace.trace @@ -127,18 +129,26 @@ end) | ok -> Lwt.return ok let error_unless cond exn = - if cond then Monad.Traced_result_syntax.return_unit else error exn + let open Monad.Traced_result_syntax in + if cond then return_unit else fail exn let error_when cond exn = - if cond then error exn else Monad.Traced_result_syntax.return_unit + let open Monad.Traced_result_syntax in + if cond then fail exn else return_unit - let fail_unless cond exn = if cond then return_unit else fail exn + let fail_unless cond exn = + let open Monad.Lwt_traced_result_syntax in + if cond then return_unit else fail exn - let fail_when cond exn = if cond then fail exn else return_unit + let fail_when cond exn = + let open Monad.Lwt_traced_result_syntax in + if cond then fail exn else return_unit - let unless cond f = if cond then return_unit else f () + let unless cond f = + if cond then Monad.Lwt_traced_result_syntax.return_unit else f () - let when_ cond f = if cond then f () else return_unit + let when_ cond f = + if cond then f () else Monad.Lwt_traced_result_syntax.return_unit let dont_wait f err_handler exc_handler = let open Monad.Lwt_syntax in diff --git a/src/lib_error_monad/sig.ml b/src/lib_error_monad/sig.ml index b3e041e656fd..f8c9c4347590 100644 --- a/src/lib_error_monad/sig.ml +++ b/src/lib_error_monad/sig.ml @@ -253,46 +253,47 @@ module type MONAD_EXTENSION = sig val classify_trace : tztrace -> Error_classification.t - val return : 'a -> ('a, 'e) result Lwt.t + module Legacy_monad_globals : sig + val return : 'a -> ('a, 'e) result Lwt.t - val return_unit : (unit, 'e) result Lwt.t + val return_unit : (unit, 'e) result Lwt.t - val return_none : ('a option, 'e) result Lwt.t + val return_none : ('a option, 'e) result Lwt.t - val return_some : 'a -> ('a option, 'e) result Lwt.t + val return_some : 'a -> ('a option, 'e) result Lwt.t - val return_nil : ('a list, 'e) result Lwt.t + val return_nil : ('a list, 'e) result Lwt.t - val return_true : (bool, 'e) result Lwt.t + val return_true : (bool, 'e) result Lwt.t - val return_false : (bool, 'e) result Lwt.t + val return_false : (bool, 'e) result Lwt.t - (** more globals *) - val ( >>= ) : 'a Lwt.t -> ('a -> 'b Lwt.t) -> 'b Lwt.t + val ( >>= ) : 'a Lwt.t -> ('a -> 'b Lwt.t) -> 'b Lwt.t - val ( >|= ) : 'a Lwt.t -> ('a -> 'b) -> 'b Lwt.t + val ( >|= ) : 'a Lwt.t -> ('a -> 'b) -> 'b Lwt.t - val ok : 'a -> ('a, 'e) result + val ok : 'a -> ('a, 'e) result - val error : 'e -> ('a, 'e trace) result + val error : 'e -> ('a, 'e trace) result - val ( >>? ) : ('a, 'e) result -> ('a -> ('b, 'e) result) -> ('b, 'e) result + val ( >>? ) : ('a, 'e) result -> ('a -> ('b, 'e) result) -> ('b, 'e) result - val ( >|? ) : ('a, 'e) result -> ('a -> 'b) -> ('b, 'e) result + val ( >|? ) : ('a, 'e) result -> ('a -> 'b) -> ('b, 'e) result - val fail : 'e -> ('a, 'e trace) result Lwt.t + val fail : 'e -> ('a, 'e trace) result Lwt.t - val ( >>=? ) : - ('a, 'e) result Lwt.t -> - ('a -> ('b, 'e) result Lwt.t) -> - ('b, 'e) result Lwt.t + val ( >>=? ) : + ('a, 'e) result Lwt.t -> + ('a -> ('b, 'e) result Lwt.t) -> + ('b, 'e) result Lwt.t - val ( >|=? ) : ('a, 'e) result Lwt.t -> ('a -> 'b) -> ('b, 'e) result Lwt.t + val ( >|=? ) : ('a, 'e) result Lwt.t -> ('a -> 'b) -> ('b, 'e) result Lwt.t - val ( >>?= ) : - ('a, 'e) result -> ('a -> ('b, 'e) result Lwt.t) -> ('b, 'e) result Lwt.t + val ( >>?= ) : + ('a, 'e) result -> ('a -> ('b, 'e) result Lwt.t) -> ('b, 'e) result Lwt.t - val ( >|?= ) : ('a, 'e) result -> ('a -> 'b Lwt.t) -> ('b, 'e) result Lwt.t + val ( >|?= ) : ('a, 'e) result -> ('a -> 'b Lwt.t) -> ('b, 'e) result Lwt.t + end (* Pretty-prints an error trace. *) val pp_print_trace : Format.formatter -> error trace -> unit -- GitLab From d27a69e76c035cce38e8db955f2ebd0e8f694b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Mon, 14 Mar 2022 18:15:24 +0100 Subject: [PATCH 2/5] Proto-env: backwards compatibility layer for the infix binders --- .../environment_V0.ml | 5 +- .../environment_V1.ml | 5 ++ .../environment_V2.ml | 5 ++ .../environment_V3.ml | 6 ++ .../environment_V4.ml | 6 ++ .../environment_V5.ml | 6 ++ .../structs/v0.dune.inc | 1 + .../structs/v0/error_monad_infix_globals.ml | 62 +++++++++++++++++++ .../structs/v1.dune.inc | 1 + .../structs/v2.dune.inc | 1 + .../structs/v3.dune.inc | 1 + .../structs/v4.dune.inc | 1 + .../structs/v5.dune.inc | 1 + 13 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 src/lib_protocol_environment/structs/v0/error_monad_infix_globals.ml diff --git a/src/lib_protocol_environment/environment_V0.ml b/src/lib_protocol_environment/environment_V0.ml index b2b03bddacf5..c8340b3246b8 100644 --- a/src/lib_protocol_environment/environment_V0.ml +++ b/src/lib_protocol_environment/environment_V0.ml @@ -382,10 +382,13 @@ struct (Tezos_error_monad.TzLwtreslib.Monad) (* below is for backward compatibility *) + include Error_monad_infix_globals include Error_monad_traversors include Error_monad_trace_eval - let ( >>|? ) = Lwt_result_syntax.( let+ ) + let fail e = Lwt.return_error (TzTrace.make e) + + let error e = Error (TzTrace.make e) (* Shouldn't be used, only to keep the same environment interface *) let classify_errors = function diff --git a/src/lib_protocol_environment/environment_V1.ml b/src/lib_protocol_environment/environment_V1.ml index 79dd9b251bed..aa85063df035 100644 --- a/src/lib_protocol_environment/environment_V1.ml +++ b/src/lib_protocol_environment/environment_V1.ml @@ -569,10 +569,15 @@ struct (Tezos_error_monad.TzLwtreslib.Monad) (* Backwards compatibility additions (traversors, dont_wait, trace) *) + include Error_monad_infix_globals include Error_monad_traversors include Error_monad_preallocated_values include Error_monad_trace_eval + let fail e = Lwt.return_error (TzTrace.make e) + + let error e = Error (TzTrace.make e) + let dont_wait ex er f = dont_wait f er ex type 'err trace = 'err TzTrace.trace diff --git a/src/lib_protocol_environment/environment_V2.ml b/src/lib_protocol_environment/environment_V2.ml index 1338d0322fa0..ebac989eb089 100644 --- a/src/lib_protocol_environment/environment_V2.ml +++ b/src/lib_protocol_environment/environment_V2.ml @@ -577,10 +577,15 @@ struct (Tezos_error_monad.TzLwtreslib.Monad) (* Backwards compatibility additions (traversors, dont_wait, trace helpers) *) + include Error_monad_infix_globals include Error_monad_traversors include Error_monad_preallocated_values include Error_monad_trace_eval + let fail e = Lwt.return_error (TzTrace.make e) + + let error e = Error (TzTrace.make e) + let dont_wait ex er f = dont_wait f er ex let make_trace_encoding e = TzTrace.encoding e diff --git a/src/lib_protocol_environment/environment_V3.ml b/src/lib_protocol_environment/environment_V3.ml index de11671715ff..831017b7b8e6 100644 --- a/src/lib_protocol_environment/environment_V3.ml +++ b/src/lib_protocol_environment/environment_V3.ml @@ -664,11 +664,17 @@ struct (Tezos_error_monad.TzLwtreslib.Monad) (* Backwards compatibility additions (dont_wait, trace helpers) *) + include Tezos_protocol_environment_structs.V3.M.Error_monad_infix_globals + include Tezos_protocol_environment_structs.V3.M.Error_monad_preallocated_values include Tezos_protocol_environment_structs.V3.M.Error_monad_trace_eval + let fail e = Lwt.return_error (TzTrace.make e) + + let error e = Error (TzTrace.make e) + let dont_wait ex er f = dont_wait f er ex let trace_of_error e = TzTrace.make e diff --git a/src/lib_protocol_environment/environment_V4.ml b/src/lib_protocol_environment/environment_V4.ml index 91711430ffdd..0d894ecf713c 100644 --- a/src/lib_protocol_environment/environment_V4.ml +++ b/src/lib_protocol_environment/environment_V4.ml @@ -713,6 +713,12 @@ struct (Tezos_error_monad.TzLwtreslib.Monad) (* Backwards compatibility additions (dont_wait, trace helpers) *) + include Tezos_protocol_environment_structs.V4.M.Error_monad_infix_globals + + let fail e = Lwt.return_error (TzTrace.make e) + + let error e = Error (TzTrace.make e) + let dont_wait ex er f = dont_wait f er ex let trace_of_error e = TzTrace.make e diff --git a/src/lib_protocol_environment/environment_V5.ml b/src/lib_protocol_environment/environment_V5.ml index cc4d1f22353f..99cee206cecc 100644 --- a/src/lib_protocol_environment/environment_V5.ml +++ b/src/lib_protocol_environment/environment_V5.ml @@ -686,6 +686,12 @@ struct (Tezos_error_monad.TzLwtreslib.Monad) (* Backwards compatibility additions (dont_wait, trace helpers) *) + include Tezos_protocol_environment_structs.V5.M.Error_monad_infix_globals + + let fail e = Lwt.return_error (TzTrace.make e) + + let error e = Error (TzTrace.make e) + let dont_wait ex er f = dont_wait f er ex let trace_of_error e = TzTrace.make e diff --git a/src/lib_protocol_environment/structs/v0.dune.inc b/src/lib_protocol_environment/structs/v0.dune.inc index 02db3712e599..342c215adf65 100644 --- a/src/lib_protocol_environment/structs/v0.dune.inc +++ b/src/lib_protocol_environment/structs/v0.dune.inc @@ -18,6 +18,7 @@ v0/context_hash.ml v0/error_monad_traversors.ml v0/data_encoding.ml + v0/error_monad_infix_globals.ml v0/error_monad_trace_eval.ml v0/error_monad_classification.ml ) diff --git a/src/lib_protocol_environment/structs/v0/error_monad_infix_globals.ml b/src/lib_protocol_environment/structs/v0/error_monad_infix_globals.ml new file mode 100644 index 000000000000..7074a10b3a66 --- /dev/null +++ b/src/lib_protocol_environment/structs/v0/error_monad_infix_globals.ml @@ -0,0 +1,62 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +let return = Lwt.return_ok + +let return_unit = Lwt.return_ok () + +let return_true = Lwt.return_ok true + +let return_false = Lwt.return_ok false + +let return_nil = Lwt.return_ok [] + +let return_none = Lwt.return_ok None + +let return_some x = Lwt.return_ok (Some x) + +let ( >>= ) = Lwt.bind + +let ( >|= ) v f = Lwt.map f v + +let ( >>? ) = Result.bind + +let ( >|? ) v f = Result.map f v + +let ( >>=? ) = Lwt_result.bind + +let ( >|=? ) v f = Lwt_result.map f v + +let ( >>?= ) v f = match v with Error e -> Lwt.return_error e | Ok o -> f o + +let ( >|?= ) v f = + match v with + | Error e -> Lwt.return_error e + | Ok o -> f o >>= fun x -> Lwt.return_ok x + +let ok x = Ok x + +let ( >>|? ) v f = + v >>= function Error e -> Lwt.return_error e | Ok v -> Lwt.return_ok (f v) diff --git a/src/lib_protocol_environment/structs/v1.dune.inc b/src/lib_protocol_environment/structs/v1.dune.inc index 989efa6ef2d3..653e8cb36dc4 100644 --- a/src/lib_protocol_environment/structs/v1.dune.inc +++ b/src/lib_protocol_environment/structs/v1.dune.inc @@ -20,6 +20,7 @@ v1/bls12_381.ml v1/error_monad_preallocated_values.ml v1/hex.ml + v0/error_monad_infix_globals.ml v0/error_monad_trace_eval.ml v0/error_monad_classification.ml ) diff --git a/src/lib_protocol_environment/structs/v2.dune.inc b/src/lib_protocol_environment/structs/v2.dune.inc index 00b7e7b86540..4a95190c93c4 100644 --- a/src/lib_protocol_environment/structs/v2.dune.inc +++ b/src/lib_protocol_environment/structs/v2.dune.inc @@ -19,6 +19,7 @@ v1/bls12_381.ml v1/error_monad_preallocated_values.ml v1/hex.ml + v0/error_monad_infix_globals.ml v0/error_monad_trace_eval.ml v0/error_monad_classification.ml ) diff --git a/src/lib_protocol_environment/structs/v3.dune.inc b/src/lib_protocol_environment/structs/v3.dune.inc index 77ad80ebd318..0d77bddef964 100644 --- a/src/lib_protocol_environment/structs/v3.dune.inc +++ b/src/lib_protocol_environment/structs/v3.dune.inc @@ -7,6 +7,7 @@ v1/bls12_381.ml v1/error_monad_preallocated_values.ml v1/hex.ml + v0/error_monad_infix_globals.ml v0/error_monad_trace_eval.ml v0/error_monad_classification.ml ) diff --git a/src/lib_protocol_environment/structs/v4.dune.inc b/src/lib_protocol_environment/structs/v4.dune.inc index f17dfe0061d7..0cf7c0e02112 100644 --- a/src/lib_protocol_environment/structs/v4.dune.inc +++ b/src/lib_protocol_environment/structs/v4.dune.inc @@ -4,6 +4,7 @@ v3/data_encoding.ml v3/replicated_signatures.ml v3/lwtreslib_list_combine.ml + v0/error_monad_infix_globals.ml ) (action (with-stdout-to %{targets} (chdir %{workspace_root}} diff --git a/src/lib_protocol_environment/structs/v5.dune.inc b/src/lib_protocol_environment/structs/v5.dune.inc index 2eab0a72d0e5..eb7b33e0bb4f 100644 --- a/src/lib_protocol_environment/structs/v5.dune.inc +++ b/src/lib_protocol_environment/structs/v5.dune.inc @@ -1,6 +1,7 @@ (rule (targets v5.ml) (deps + v0/error_monad_infix_globals.ml ) (action (with-stdout-to %{targets} (chdir %{workspace_root}} -- GitLab From 0a24f8bf4efd41356fb15e3cb51ccca501a466c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Mon, 14 Mar 2022 18:18:15 +0100 Subject: [PATCH 3/5] Protos(all): open Legacy infix namespace in dune files --- src/proto_000_Ps9mPmXa/lib_client/dune | 1 + src/proto_001_PtCJ7pwo/lib_client/dune | 1 + src/proto_001_PtCJ7pwo/lib_client_commands/dune | 2 ++ src/proto_002_PsYLVpVv/lib_client/dune | 1 + src/proto_002_PsYLVpVv/lib_client_commands/dune | 2 ++ src/proto_003_PsddFKi3/lib_client/dune | 1 + src/proto_003_PsddFKi3/lib_client_commands/dune | 2 ++ src/proto_004_Pt24m4xi/lib_client/dune | 1 + src/proto_004_Pt24m4xi/lib_client_commands/dune | 2 ++ src/proto_005_PsBabyM1/lib_client/dune | 1 + src/proto_005_PsBabyM1/lib_client_commands/dune | 2 ++ src/proto_006_PsCARTHA/lib_client/dune | 1 + src/proto_006_PsCARTHA/lib_client_commands/dune | 2 ++ src/proto_007_PsDELPH1/lib_client/dune | 1 + src/proto_007_PsDELPH1/lib_client_commands/dune | 2 ++ src/proto_007_PsDELPH1/lib_plugin/dune | 2 ++ src/proto_008_PtEdo2Zk/lib_client/dune | 1 + src/proto_008_PtEdo2Zk/lib_client_commands/dune | 2 ++ src/proto_008_PtEdo2Zk/lib_client_sapling/dune | 1 + src/proto_008_PtEdo2Zk/lib_plugin/dune | 2 ++ src/proto_009_PsFLoren/lib_client/dune | 1 + src/proto_009_PsFLoren/lib_client_commands/dune | 2 ++ src/proto_009_PsFLoren/lib_client_sapling/dune | 1 + src/proto_009_PsFLoren/lib_plugin/dune | 2 ++ src/proto_010_PtGRANAD/lib_client/dune | 1 + src/proto_010_PtGRANAD/lib_client_commands/dune | 2 ++ src/proto_010_PtGRANAD/lib_client_sapling/dune | 1 + src/proto_010_PtGRANAD/lib_plugin/dune | 2 ++ src/proto_011_PtHangz2/bin_accuser/dune | 1 + src/proto_011_PtHangz2/bin_baker/dune | 1 + src/proto_011_PtHangz2/bin_endorser/dune | 1 + src/proto_011_PtHangz2/lib_benchmark/dune | 1 + src/proto_011_PtHangz2/lib_benchmark/test/dune | 1 + src/proto_011_PtHangz2/lib_benchmarks_proto/dune | 1 + src/proto_011_PtHangz2/lib_client/dune | 1 + src/proto_011_PtHangz2/lib_client/test/dune | 1 + src/proto_011_PtHangz2/lib_client_commands/dune | 2 ++ src/proto_011_PtHangz2/lib_client_sapling/dune | 1 + src/proto_011_PtHangz2/lib_delegate/dune | 2 ++ src/proto_011_PtHangz2/lib_delegate/test/dune | 1 + src/proto_011_PtHangz2/lib_plugin/dune | 2 ++ src/proto_011_PtHangz2/lib_protocol/test/helpers/dune | 1 + .../lib_protocol/test/integration/consensus/dune | 1 + src/proto_011_PtHangz2/lib_protocol/test/integration/dune | 1 + src/proto_011_PtHangz2/lib_protocol/test/integration/gas/dune | 1 + .../lib_protocol/test/integration/michelson/dune | 1 + .../lib_protocol/test/integration/operations/dune | 1 + src/proto_011_PtHangz2/lib_protocol/test/pbt/dune | 1 + src/proto_011_PtHangz2/lib_protocol/test/unit/dune | 1 + src/proto_012_Psithaca/bin_accuser/dune | 1 + src/proto_012_Psithaca/bin_baker/dune | 1 + src/proto_012_Psithaca/lib_benchmark/dune | 1 + src/proto_012_Psithaca/lib_benchmark/test/dune | 1 + src/proto_012_Psithaca/lib_benchmarks_proto/dune | 1 + src/proto_012_Psithaca/lib_client/dune | 1 + src/proto_012_Psithaca/lib_client/test/dune | 1 + src/proto_012_Psithaca/lib_client_commands/dune | 2 ++ src/proto_012_Psithaca/lib_client_sapling/dune | 1 + src/proto_012_Psithaca/lib_delegate/dune | 3 +++ src/proto_012_Psithaca/lib_delegate/test/dune | 1 + src/proto_012_Psithaca/lib_delegate/test/mockup_simulator/dune | 1 + src/proto_012_Psithaca/lib_plugin/dune | 2 ++ src/proto_012_Psithaca/lib_plugin/test/dune | 1 + src/proto_012_Psithaca/lib_protocol/test/helpers/dune | 1 + .../lib_protocol/test/integration/consensus/dune | 1 + src/proto_012_Psithaca/lib_protocol/test/integration/dune | 1 + src/proto_012_Psithaca/lib_protocol/test/integration/gas/dune | 1 + .../lib_protocol/test/integration/michelson/dune | 1 + .../lib_protocol/test/integration/operations/dune | 1 + src/proto_012_Psithaca/lib_protocol/test/pbt/dune | 1 + src/proto_012_Psithaca/lib_protocol/test/unit/dune | 1 + src/proto_alpha/bin_accuser/dune | 1 + src/proto_alpha/bin_baker/dune | 1 + src/proto_alpha/bin_sc_rollup_client/dune | 1 + src/proto_alpha/bin_sc_rollup_node/dune | 1 + src/proto_alpha/bin_tx_rollup_node/dune | 1 + src/proto_alpha/lib_benchmark/dune | 1 + src/proto_alpha/lib_benchmark/test/dune | 1 + src/proto_alpha/lib_benchmarks_proto/dune | 1 + src/proto_alpha/lib_client/dune | 1 + src/proto_alpha/lib_client/test/dune | 1 + src/proto_alpha/lib_client_commands/dune | 2 ++ src/proto_alpha/lib_client_sapling/dune | 1 + src/proto_alpha/lib_delegate/dune | 2 ++ src/proto_alpha/lib_delegate/test/dune | 1 + src/proto_alpha/lib_delegate/test/mockup_simulator/dune | 1 + src/proto_alpha/lib_delegate/test/tenderbrute/dune | 1 + src/proto_alpha/lib_delegate/test/tenderbrute/lib/dune | 1 + src/proto_alpha/lib_plugin/dune | 2 ++ src/proto_alpha/lib_plugin/test/dune | 1 + src/proto_alpha/lib_protocol/test/helpers/dune | 1 + src/proto_alpha/lib_protocol/test/integration/consensus/dune | 1 + src/proto_alpha/lib_protocol/test/integration/dune | 1 + src/proto_alpha/lib_protocol/test/integration/gas/dune | 1 + src/proto_alpha/lib_protocol/test/integration/michelson/dune | 1 + src/proto_alpha/lib_protocol/test/integration/operations/dune | 1 + src/proto_alpha/lib_protocol/test/pbt/dune | 1 + src/proto_alpha/lib_protocol/test/unit/dune | 1 + src/proto_demo_counter/lib_client/dune | 1 + src/proto_genesis/lib_client/dune | 1 + src/proto_genesis_carthagenet/lib_client/dune | 1 + 101 files changed, 125 insertions(+) diff --git a/src/proto_000_Ps9mPmXa/lib_client/dune b/src/proto_000_Ps9mPmXa/lib_client/dune index 20eec0e7a239..aa6e04c8f321 100644 --- a/src/proto_000_Ps9mPmXa/lib_client/dune +++ b/src/proto_000_Ps9mPmXa/lib_client/dune @@ -12,6 +12,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_000_Ps9mPmXa diff --git a/src/proto_001_PtCJ7pwo/lib_client/dune b/src/proto_001_PtCJ7pwo/lib_client/dune index dec141846fa8..0c548d65d096 100644 --- a/src/proto_001_PtCJ7pwo/lib_client/dune +++ b/src/proto_001_PtCJ7pwo/lib_client/dune @@ -14,6 +14,7 @@ -w -9+27-30-32-40@8 -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_001_PtCJ7pwo diff --git a/src/proto_001_PtCJ7pwo/lib_client_commands/dune b/src/proto_001_PtCJ7pwo/lib_client_commands/dune index d29c87e6d09c..06c9b988d199 100644 --- a/src/proto_001_PtCJ7pwo/lib_client_commands/dune +++ b/src/proto_001_PtCJ7pwo/lib_client_commands/dune @@ -14,6 +14,7 @@ (modules (:standard \ alpha_commands_registration)) (flags (:standard -w -9+27-30-32-40@8 -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_001_PtCJ7pwo -open Tezos_stdlib_unix -open Tezos_shell_services @@ -38,6 +39,7 @@ (modules alpha_commands_registration) (flags (:standard -w -9+27-30-32-40@8 -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_001_PtCJ7pwo -open Tezos_shell_services -open Tezos_client_base diff --git a/src/proto_002_PsYLVpVv/lib_client/dune b/src/proto_002_PsYLVpVv/lib_client/dune index 93ba29829c61..0e1eaefd5011 100644 --- a/src/proto_002_PsYLVpVv/lib_client/dune +++ b/src/proto_002_PsYLVpVv/lib_client/dune @@ -14,6 +14,7 @@ -w -9+27-30-32-40@8 -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_002_PsYLVpVv diff --git a/src/proto_002_PsYLVpVv/lib_client_commands/dune b/src/proto_002_PsYLVpVv/lib_client_commands/dune index b4c1b09f8e17..20fcb71b52ec 100644 --- a/src/proto_002_PsYLVpVv/lib_client_commands/dune +++ b/src/proto_002_PsYLVpVv/lib_client_commands/dune @@ -14,6 +14,7 @@ (modules (:standard \ alpha_commands_registration)) (flags (:standard -w -9+27-30-32-40@8 -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_002_PsYLVpVv -open Tezos_stdlib_unix -open Tezos_shell_services @@ -38,6 +39,7 @@ (modules alpha_commands_registration) (flags (:standard -w -9+27-30-32-40@8 -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_002_PsYLVpVv -open Tezos_shell_services -open Tezos_client_base diff --git a/src/proto_003_PsddFKi3/lib_client/dune b/src/proto_003_PsddFKi3/lib_client/dune index 2f0b22d3e742..132a82636734 100644 --- a/src/proto_003_PsddFKi3/lib_client/dune +++ b/src/proto_003_PsddFKi3/lib_client/dune @@ -12,6 +12,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_003_PsddFKi3 diff --git a/src/proto_003_PsddFKi3/lib_client_commands/dune b/src/proto_003_PsddFKi3/lib_client_commands/dune index e21617853f83..73d40df38d6b 100644 --- a/src/proto_003_PsddFKi3/lib_client_commands/dune +++ b/src/proto_003_PsddFKi3/lib_client_commands/dune @@ -12,6 +12,7 @@ (library_flags (:standard -linkall)) (modules (:standard \ alpha_commands_registration)) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_003_PsddFKi3 -open Tezos_stdlib_unix -open Tezos_shell_services @@ -35,6 +36,7 @@ (library_flags (:standard -linkall)) (modules alpha_commands_registration) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_003_PsddFKi3 -open Tezos_shell_services -open Tezos_client_base diff --git a/src/proto_004_Pt24m4xi/lib_client/dune b/src/proto_004_Pt24m4xi/lib_client/dune index 1c054fabac2e..6f7e593b6306 100644 --- a/src/proto_004_Pt24m4xi/lib_client/dune +++ b/src/proto_004_Pt24m4xi/lib_client/dune @@ -12,6 +12,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_004_Pt24m4xi diff --git a/src/proto_004_Pt24m4xi/lib_client_commands/dune b/src/proto_004_Pt24m4xi/lib_client_commands/dune index ff9cc9fb75c9..ba294298a95f 100644 --- a/src/proto_004_Pt24m4xi/lib_client_commands/dune +++ b/src/proto_004_Pt24m4xi/lib_client_commands/dune @@ -12,6 +12,7 @@ (library_flags (:standard -linkall)) (modules (:standard \ alpha_commands_registration)) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_004_Pt24m4xi -open Tezos_stdlib_unix -open Tezos_shell_services @@ -35,6 +36,7 @@ (library_flags (:standard -linkall)) (modules alpha_commands_registration) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_004_Pt24m4xi -open Tezos_shell_services -open Tezos_client_base diff --git a/src/proto_005_PsBabyM1/lib_client/dune b/src/proto_005_PsBabyM1/lib_client/dune index 979504848795..91a8799608ec 100644 --- a/src/proto_005_PsBabyM1/lib_client/dune +++ b/src/proto_005_PsBabyM1/lib_client/dune @@ -12,6 +12,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_005_PsBabyM1 diff --git a/src/proto_005_PsBabyM1/lib_client_commands/dune b/src/proto_005_PsBabyM1/lib_client_commands/dune index 18832cf0f8c8..314703421288 100644 --- a/src/proto_005_PsBabyM1/lib_client_commands/dune +++ b/src/proto_005_PsBabyM1/lib_client_commands/dune @@ -12,6 +12,7 @@ (library_flags (:standard -linkall)) (modules (:standard \ alpha_commands_registration)) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_005_PsBabyM1 -open Tezos_stdlib_unix -open Tezos_shell_services @@ -35,6 +36,7 @@ (library_flags (:standard -linkall)) (modules alpha_commands_registration) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_005_PsBabyM1 -open Tezos_shell_services -open Tezos_client_base diff --git a/src/proto_006_PsCARTHA/lib_client/dune b/src/proto_006_PsCARTHA/lib_client/dune index 6724a9a9d8cb..8674f56ba04d 100644 --- a/src/proto_006_PsCARTHA/lib_client/dune +++ b/src/proto_006_PsCARTHA/lib_client/dune @@ -12,6 +12,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_006_PsCARTHA diff --git a/src/proto_006_PsCARTHA/lib_client_commands/dune b/src/proto_006_PsCARTHA/lib_client_commands/dune index 2a07e64dbf42..ab593d63239f 100644 --- a/src/proto_006_PsCARTHA/lib_client_commands/dune +++ b/src/proto_006_PsCARTHA/lib_client_commands/dune @@ -12,6 +12,7 @@ (library_flags (:standard -linkall)) (modules (:standard \ alpha_commands_registration)) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_006_PsCARTHA -open Tezos_stdlib_unix -open Tezos_shell_services @@ -35,6 +36,7 @@ (library_flags (:standard -linkall)) (modules alpha_commands_registration) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_006_PsCARTHA -open Tezos_shell_services -open Tezos_client_base diff --git a/src/proto_007_PsDELPH1/lib_client/dune b/src/proto_007_PsDELPH1/lib_client/dune index e8149f2ed283..d7ccf0f3b310 100644 --- a/src/proto_007_PsDELPH1/lib_client/dune +++ b/src/proto_007_PsDELPH1/lib_client/dune @@ -15,6 +15,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_007_PsDELPH1 diff --git a/src/proto_007_PsDELPH1/lib_client_commands/dune b/src/proto_007_PsDELPH1/lib_client_commands/dune index 0d639f6f612d..c3868940f922 100644 --- a/src/proto_007_PsDELPH1/lib_client_commands/dune +++ b/src/proto_007_PsDELPH1/lib_client_commands/dune @@ -15,6 +15,7 @@ (library_flags (:standard -linkall)) (modules (:standard \ alpha_commands_registration)) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_007_PsDELPH1 -open Tezos_stdlib_unix -open Tezos_shell_services @@ -38,6 +39,7 @@ (library_flags (:standard -linkall)) (modules alpha_commands_registration) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_007_PsDELPH1 -open Tezos_shell_services -open Tezos_client_base diff --git a/src/proto_007_PsDELPH1/lib_plugin/dune b/src/proto_007_PsDELPH1/lib_plugin/dune index ba7a2f69bd47..4a6eab558762 100644 --- a/src/proto_007_PsDELPH1/lib_plugin/dune +++ b/src/proto_007_PsDELPH1/lib_plugin/dune @@ -5,6 +5,7 @@ tezos-protocol-007-PsDELPH1) (modules (:standard) \ Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_007_PsDELPH1))) (library @@ -16,6 +17,7 @@ tezos-shell) (modules Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_embedded_protocol_007_PsDELPH1 -open Tezos_protocol_plugin_007_PsDELPH1 -open Tezos_shell))) diff --git a/src/proto_008_PtEdo2Zk/lib_client/dune b/src/proto_008_PtEdo2Zk/lib_client/dune index 91a65c9f1008..4e6194969acc 100644 --- a/src/proto_008_PtEdo2Zk/lib_client/dune +++ b/src/proto_008_PtEdo2Zk/lib_client/dune @@ -17,6 +17,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_008_PtEdo2Zk diff --git a/src/proto_008_PtEdo2Zk/lib_client_commands/dune b/src/proto_008_PtEdo2Zk/lib_client_commands/dune index 3670fca3594f..d8f4fb0ea3ac 100644 --- a/src/proto_008_PtEdo2Zk/lib_client_commands/dune +++ b/src/proto_008_PtEdo2Zk/lib_client_commands/dune @@ -17,6 +17,7 @@ (library_flags (:standard -linkall)) (modules (:standard \ alpha_commands_registration)) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_008_PtEdo2Zk -open Tezos_stdlib_unix -open Tezos_shell_services @@ -44,6 +45,7 @@ (library_flags (:standard -linkall)) (modules alpha_commands_registration) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_008_PtEdo2Zk -open Tezos_shell_services -open Tezos_client_base diff --git a/src/proto_008_PtEdo2Zk/lib_client_sapling/dune b/src/proto_008_PtEdo2Zk/lib_client_sapling/dune index bb622c0949bb..f7050d9fc679 100644 --- a/src/proto_008_PtEdo2Zk/lib_client_sapling/dune +++ b/src/proto_008_PtEdo2Zk/lib_client_sapling/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_stdlib_unix -open Tezos_client_base -open Tezos_client_008_PtEdo2Zk diff --git a/src/proto_008_PtEdo2Zk/lib_plugin/dune b/src/proto_008_PtEdo2Zk/lib_plugin/dune index 4e435902d176..211ba0ab4fb7 100644 --- a/src/proto_008_PtEdo2Zk/lib_plugin/dune +++ b/src/proto_008_PtEdo2Zk/lib_plugin/dune @@ -6,6 +6,7 @@ tezos-protocol-008-PtEdo2Zk) (modules (:standard) \ Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_008_PtEdo2Zk))) (library @@ -18,6 +19,7 @@ tezos-shell) (modules Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_embedded_protocol_008_PtEdo2Zk -open Tezos_protocol_plugin_008_PtEdo2Zk -open Tezos_shell))) diff --git a/src/proto_009_PsFLoren/lib_client/dune b/src/proto_009_PsFLoren/lib_client/dune index 053ca9426a41..67d84a2556ec 100644 --- a/src/proto_009_PsFLoren/lib_client/dune +++ b/src/proto_009_PsFLoren/lib_client/dune @@ -19,6 +19,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_009_PsFLoren diff --git a/src/proto_009_PsFLoren/lib_client_commands/dune b/src/proto_009_PsFLoren/lib_client_commands/dune index af16bd18a301..45748313cd4a 100644 --- a/src/proto_009_PsFLoren/lib_client_commands/dune +++ b/src/proto_009_PsFLoren/lib_client_commands/dune @@ -18,6 +18,7 @@ (library_flags (:standard -linkall)) (modules (:standard \ alpha_commands_registration)) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_009_PsFLoren -open Tezos_stdlib_unix -open Tezos_shell_services @@ -46,6 +47,7 @@ (library_flags (:standard -linkall)) (modules alpha_commands_registration) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_009_PsFLoren -open Tezos_shell_services -open Tezos_client_base diff --git a/src/proto_009_PsFLoren/lib_client_sapling/dune b/src/proto_009_PsFLoren/lib_client_sapling/dune index 9407107d71ee..9d247eb0022d 100644 --- a/src/proto_009_PsFLoren/lib_client_sapling/dune +++ b/src/proto_009_PsFLoren/lib_client_sapling/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_stdlib_unix -open Tezos_client_base -open Tezos_client_009_PsFLoren diff --git a/src/proto_009_PsFLoren/lib_plugin/dune b/src/proto_009_PsFLoren/lib_plugin/dune index 5426ca3c4d4d..b321fc152d7a 100644 --- a/src/proto_009_PsFLoren/lib_plugin/dune +++ b/src/proto_009_PsFLoren/lib_plugin/dune @@ -6,6 +6,7 @@ tezos-protocol-009-PsFLoren) (modules (:standard) \ Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_009_PsFLoren))) (library @@ -18,6 +19,7 @@ tezos-shell) (modules Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_embedded_protocol_009_PsFLoren -open Tezos_protocol_plugin_009_PsFLoren -open Tezos_shell))) diff --git a/src/proto_010_PtGRANAD/lib_client/dune b/src/proto_010_PtGRANAD/lib_client/dune index a100227b4cdf..f00e76b5ce17 100644 --- a/src/proto_010_PtGRANAD/lib_client/dune +++ b/src/proto_010_PtGRANAD/lib_client/dune @@ -19,6 +19,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_010_PtGRANAD diff --git a/src/proto_010_PtGRANAD/lib_client_commands/dune b/src/proto_010_PtGRANAD/lib_client_commands/dune index 3554c1994080..46a7947bcf58 100644 --- a/src/proto_010_PtGRANAD/lib_client_commands/dune +++ b/src/proto_010_PtGRANAD/lib_client_commands/dune @@ -18,6 +18,7 @@ (library_flags (:standard -linkall)) (modules (:standard \ alpha_commands_registration)) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_010_PtGRANAD -open Tezos_stdlib_unix -open Tezos_shell_services @@ -46,6 +47,7 @@ (library_flags (:standard -linkall)) (modules alpha_commands_registration) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_010_PtGRANAD -open Tezos_shell_services -open Tezos_client_base diff --git a/src/proto_010_PtGRANAD/lib_client_sapling/dune b/src/proto_010_PtGRANAD/lib_client_sapling/dune index e0df6cc15625..1bd12aed8824 100644 --- a/src/proto_010_PtGRANAD/lib_client_sapling/dune +++ b/src/proto_010_PtGRANAD/lib_client_sapling/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_stdlib_unix -open Tezos_client_base -open Tezos_client_010_PtGRANAD diff --git a/src/proto_010_PtGRANAD/lib_plugin/dune b/src/proto_010_PtGRANAD/lib_plugin/dune index a5d1cace2e2f..471d75dbd4a9 100644 --- a/src/proto_010_PtGRANAD/lib_plugin/dune +++ b/src/proto_010_PtGRANAD/lib_plugin/dune @@ -6,6 +6,7 @@ tezos-protocol-010-PtGRANAD) (modules (:standard) \ Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_010_PtGRANAD))) (library @@ -18,6 +19,7 @@ tezos-shell) (modules Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_embedded_protocol_010_PtGRANAD -open Tezos_protocol_plugin_010_PtGRANAD -open Tezos_shell))) diff --git a/src/proto_011_PtHangz2/bin_accuser/dune b/src/proto_011_PtHangz2/bin_accuser/dune index 77b09a7257e1..51dfbe77f3c9 100644 --- a/src/proto_011_PtHangz2/bin_accuser/dune +++ b/src/proto_011_PtHangz2/bin_accuser/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_011_PtHangz2 -open Tezos_client_011_PtHangz2 -open Tezos_client_commands diff --git a/src/proto_011_PtHangz2/bin_baker/dune b/src/proto_011_PtHangz2/bin_baker/dune index 4a8a5460e91c..fb99d9ad40e0 100644 --- a/src/proto_011_PtHangz2/bin_baker/dune +++ b/src/proto_011_PtHangz2/bin_baker/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_011_PtHangz2 -open Tezos_client_011_PtHangz2 -open Tezos_client_commands diff --git a/src/proto_011_PtHangz2/bin_endorser/dune b/src/proto_011_PtHangz2/bin_endorser/dune index d4b3e36c3136..ac55cf831d11 100644 --- a/src/proto_011_PtHangz2/bin_endorser/dune +++ b/src/proto_011_PtHangz2/bin_endorser/dune @@ -12,6 +12,7 @@ tezos-client-commands tezos-baking-011-PtHangz2-commands) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_011_PtHangz2 -open Tezos_client_011_PtHangz2 -open Tezos_client_commands diff --git a/src/proto_011_PtHangz2/lib_benchmark/dune b/src/proto_011_PtHangz2/lib_benchmark/dune index e7026efb815e..6088df6d73b6 100644 --- a/src/proto_011_PtHangz2/lib_benchmark/dune +++ b/src/proto_011_PtHangz2/lib_benchmark/dune @@ -18,6 +18,7 @@ (flags (:standard -open Tezos_stdlib -open Tezos_base -open Tezos_error_monad + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_micheline_rewriting -open Tezos_benchmark diff --git a/src/proto_011_PtHangz2/lib_benchmark/test/dune b/src/proto_011_PtHangz2/lib_benchmark/test/dune index 67952bc6b0ef..ea992dd0616b 100644 --- a/src/proto_011_PtHangz2/lib_benchmark/test/dune +++ b/src/proto_011_PtHangz2/lib_benchmark/test/dune @@ -13,6 +13,7 @@ ;; uncomment to enable gprof profiling ;; (ocamlopt_flags (:standard -p -ccopt -no-pie)) (flags (:standard + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_benchmark -open Tezos_protocol_011_PtHangz2 diff --git a/src/proto_011_PtHangz2/lib_benchmarks_proto/dune b/src/proto_011_PtHangz2/lib_benchmarks_proto/dune index 777dd4c9ae55..4ff06e7396ab 100644 --- a/src/proto_011_PtHangz2/lib_benchmarks_proto/dune +++ b/src/proto_011_PtHangz2/lib_benchmarks_proto/dune @@ -27,6 +27,7 @@ -open Tezos_stdlib -open Tezos_base -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_error_monad -open Tezos_benchmark -open Tezos_benchmark_011_PtHangz2 diff --git a/src/proto_011_PtHangz2/lib_client/dune b/src/proto_011_PtHangz2/lib_client/dune index 072c22b3c8ae..0fffb3c62947 100644 --- a/src/proto_011_PtHangz2/lib_client/dune +++ b/src/proto_011_PtHangz2/lib_client/dune @@ -19,6 +19,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_011_PtHangz2 diff --git a/src/proto_011_PtHangz2/lib_client/test/dune b/src/proto_011_PtHangz2/lib_client/test/dune index 2ef5bb81b661..fc9d27f001d5 100644 --- a/src/proto_011_PtHangz2/lib_client/test/dune +++ b/src/proto_011_PtHangz2/lib_client/test/dune @@ -17,6 +17,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_client_011_PtHangz2 -open Tezos_protocol_011_PtHangz2 diff --git a/src/proto_011_PtHangz2/lib_client_commands/dune b/src/proto_011_PtHangz2/lib_client_commands/dune index f90709e1ab56..cd666561abeb 100644 --- a/src/proto_011_PtHangz2/lib_client_commands/dune +++ b/src/proto_011_PtHangz2/lib_client_commands/dune @@ -18,6 +18,7 @@ (library_flags (:standard -linkall)) (modules (:standard \ alpha_commands_registration)) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_011_PtHangz2 -open Tezos_stdlib_unix -open Tezos_shell_services @@ -46,6 +47,7 @@ (library_flags (:standard -linkall)) (modules alpha_commands_registration) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_011_PtHangz2 -open Tezos_shell_services -open Tezos_client_base diff --git a/src/proto_011_PtHangz2/lib_client_sapling/dune b/src/proto_011_PtHangz2/lib_client_sapling/dune index f73df7db1a9a..b5a070938ea7 100644 --- a/src/proto_011_PtHangz2/lib_client_sapling/dune +++ b/src/proto_011_PtHangz2/lib_client_sapling/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_stdlib_unix -open Tezos_client_base -open Tezos_client_011_PtHangz2 diff --git a/src/proto_011_PtHangz2/lib_delegate/dune b/src/proto_011_PtHangz2/lib_delegate/dune index 2dff6671aebf..0674a39ecaa6 100644 --- a/src/proto_011_PtHangz2/lib_delegate/dune +++ b/src/proto_011_PtHangz2/lib_delegate/dune @@ -25,6 +25,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_011_PtHangz2 -open Tezos_protocol_plugin_011_PtHangz2 -open Tezos_shell_services @@ -58,6 +59,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_011_PtHangz2 -open Tezos_stdlib_unix -open Tezos_shell_services diff --git a/src/proto_011_PtHangz2/lib_delegate/test/dune b/src/proto_011_PtHangz2/lib_delegate/test/dune index 4a50334b6f1b..c8a14f6e5a5b 100644 --- a/src/proto_011_PtHangz2/lib_delegate/test/dune +++ b/src/proto_011_PtHangz2/lib_delegate/test/dune @@ -17,6 +17,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_client_011_PtHangz2 -open Tezos_protocol_011_PtHangz2 diff --git a/src/proto_011_PtHangz2/lib_plugin/dune b/src/proto_011_PtHangz2/lib_plugin/dune index 75d64efd37c8..6811c7561495 100644 --- a/src/proto_011_PtHangz2/lib_plugin/dune +++ b/src/proto_011_PtHangz2/lib_plugin/dune @@ -6,6 +6,7 @@ tezos-protocol-011-PtHangz2) (modules (:standard) \ Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_011_PtHangz2))) (library @@ -18,6 +19,7 @@ tezos-shell) (modules Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_embedded_protocol_011_PtHangz2 -open Tezos_protocol_plugin_011_PtHangz2 -open Tezos_shell))) diff --git a/src/proto_011_PtHangz2/lib_protocol/test/helpers/dune b/src/proto_011_PtHangz2/lib_protocol/test/helpers/dune index 602ab8b817a1..6a2abca77bd2 100644 --- a/src/proto_011_PtHangz2/lib_protocol/test/helpers/dune +++ b/src/proto_011_PtHangz2/lib_protocol/test/helpers/dune @@ -15,6 +15,7 @@ tezos-client-011-PtHangz2 tezos-protocol-plugin-011-PtHangz2) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_stdlib_unix -open Tezos_protocol_011_PtHangz2 diff --git a/src/proto_011_PtHangz2/lib_protocol/test/integration/consensus/dune b/src/proto_011_PtHangz2/lib_protocol/test/integration/consensus/dune index 08da90092906..60b93bade50c 100644 --- a/src/proto_011_PtHangz2/lib_protocol/test/integration/consensus/dune +++ b/src/proto_011_PtHangz2/lib_protocol/test/integration/consensus/dune @@ -9,6 +9,7 @@ tezos-protocol-011-PtHangz2-parameters tezos-protocol-plugin-011-PtHangz2) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_011_PtHangz2 -open Tezos_011_PtHangz2_test_helpers -open Tezos_base_test_helpers diff --git a/src/proto_011_PtHangz2/lib_protocol/test/integration/dune b/src/proto_011_PtHangz2/lib_protocol/test/integration/dune index 82b4f8eb61ac..584ad39f6b76 100644 --- a/src/proto_011_PtHangz2/lib_protocol/test/integration/dune +++ b/src/proto_011_PtHangz2/lib_protocol/test/integration/dune @@ -9,6 +9,7 @@ tezos-base-test-helpers tezos-011-PtHangz2-test-helpers) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_client_011_PtHangz2 -open Tezos_protocol_011_PtHangz2 -open Tezos_protocol_011_PtHangz2_parameters diff --git a/src/proto_011_PtHangz2/lib_protocol/test/integration/gas/dune b/src/proto_011_PtHangz2/lib_protocol/test/integration/gas/dune index c7fe2cc25261..f3d108058a06 100644 --- a/src/proto_011_PtHangz2/lib_protocol/test/integration/gas/dune +++ b/src/proto_011_PtHangz2/lib_protocol/test/integration/gas/dune @@ -7,6 +7,7 @@ tezos-base-test-helpers tezos-011-PtHangz2-test-helpers) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_011_PtHangz2 -open Tezos_011_PtHangz2_test_helpers -open Tezos_base_test_helpers))) diff --git a/src/proto_011_PtHangz2/lib_protocol/test/integration/michelson/dune b/src/proto_011_PtHangz2/lib_protocol/test/integration/michelson/dune index e60427aeef6e..30270c16511c 100644 --- a/src/proto_011_PtHangz2/lib_protocol/test/integration/michelson/dune +++ b/src/proto_011_PtHangz2/lib_protocol/test/integration/michelson/dune @@ -13,6 +13,7 @@ tezos-benchmark tezos-benchmark-011-PtHangz2) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_011_PtHangz2 -open Tezos_011_PtHangz2_test_helpers -open Tezos_base_test_helpers diff --git a/src/proto_011_PtHangz2/lib_protocol/test/integration/operations/dune b/src/proto_011_PtHangz2/lib_protocol/test/integration/operations/dune index c7fe2cc25261..f3d108058a06 100644 --- a/src/proto_011_PtHangz2/lib_protocol/test/integration/operations/dune +++ b/src/proto_011_PtHangz2/lib_protocol/test/integration/operations/dune @@ -7,6 +7,7 @@ tezos-base-test-helpers tezos-011-PtHangz2-test-helpers) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_011_PtHangz2 -open Tezos_011_PtHangz2_test_helpers -open Tezos_base_test_helpers))) diff --git a/src/proto_011_PtHangz2/lib_protocol/test/pbt/dune b/src/proto_011_PtHangz2/lib_protocol/test/pbt/dune index f10382a22209..4232404bc8ee 100644 --- a/src/proto_011_PtHangz2/lib_protocol/test/pbt/dune +++ b/src/proto_011_PtHangz2/lib_protocol/test/pbt/dune @@ -16,6 +16,7 @@ tezos-benchmark-011-PtHangz2) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_client_011_PtHangz2 -open Tezos_protocol_011_PtHangz2 diff --git a/src/proto_011_PtHangz2/lib_protocol/test/unit/dune b/src/proto_011_PtHangz2/lib_protocol/test/unit/dune index c5d03655fe6b..2281209099a2 100644 --- a/src/proto_011_PtHangz2/lib_protocol/test/unit/dune +++ b/src/proto_011_PtHangz2/lib_protocol/test/unit/dune @@ -11,6 +11,7 @@ tezos-protocol-011-PtHangz2-parameters tezos-base-test-helpers) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_base_test_helpers -open Tezos_micheline -open Tezos_client_011_PtHangz2 diff --git a/src/proto_012_Psithaca/bin_accuser/dune b/src/proto_012_Psithaca/bin_accuser/dune index 9e5c37f1d0a3..abea20bdf4b6 100644 --- a/src/proto_012_Psithaca/bin_accuser/dune +++ b/src/proto_012_Psithaca/bin_accuser/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_012_Psithaca -open Tezos_client_012_Psithaca -open Tezos_client_commands diff --git a/src/proto_012_Psithaca/bin_baker/dune b/src/proto_012_Psithaca/bin_baker/dune index b090de8714c1..d5d4af2fe2f4 100644 --- a/src/proto_012_Psithaca/bin_baker/dune +++ b/src/proto_012_Psithaca/bin_baker/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_012_Psithaca -open Tezos_client_012_Psithaca -open Tezos_client_commands diff --git a/src/proto_012_Psithaca/lib_benchmark/dune b/src/proto_012_Psithaca/lib_benchmark/dune index b667f8872dfc..7d6e281b4016 100644 --- a/src/proto_012_Psithaca/lib_benchmark/dune +++ b/src/proto_012_Psithaca/lib_benchmark/dune @@ -18,6 +18,7 @@ (flags (:standard -open Tezos_stdlib -open Tezos_base -open Tezos_error_monad + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_micheline_rewriting -open Tezos_benchmark diff --git a/src/proto_012_Psithaca/lib_benchmark/test/dune b/src/proto_012_Psithaca/lib_benchmark/test/dune index 822d94abcddb..d44f4d5646a7 100644 --- a/src/proto_012_Psithaca/lib_benchmark/test/dune +++ b/src/proto_012_Psithaca/lib_benchmark/test/dune @@ -13,6 +13,7 @@ ;; uncomment to enable gprof profiling ;; (ocamlopt_flags (:standard -p -ccopt -no-pie)) (flags (:standard + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_protocol_012_Psithaca -open Tezos_benchmark diff --git a/src/proto_012_Psithaca/lib_benchmarks_proto/dune b/src/proto_012_Psithaca/lib_benchmarks_proto/dune index bc2ce887cab0..d750fec473ef 100644 --- a/src/proto_012_Psithaca/lib_benchmarks_proto/dune +++ b/src/proto_012_Psithaca/lib_benchmarks_proto/dune @@ -27,6 +27,7 @@ -open Tezos_stdlib -open Tezos_base -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_error_monad -open Tezos_benchmark -open Tezos_benchmark_012_Psithaca diff --git a/src/proto_012_Psithaca/lib_client/dune b/src/proto_012_Psithaca/lib_client/dune index cdad36fe2c10..e31120b4e607 100644 --- a/src/proto_012_Psithaca/lib_client/dune +++ b/src/proto_012_Psithaca/lib_client/dune @@ -19,6 +19,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_012_Psithaca diff --git a/src/proto_012_Psithaca/lib_client/test/dune b/src/proto_012_Psithaca/lib_client/test/dune index ff8b42167014..6fb6118a0d6b 100644 --- a/src/proto_012_Psithaca/lib_client/test/dune +++ b/src/proto_012_Psithaca/lib_client/test/dune @@ -17,6 +17,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_client_012_Psithaca -open Tezos_protocol_012_Psithaca diff --git a/src/proto_012_Psithaca/lib_client_commands/dune b/src/proto_012_Psithaca/lib_client_commands/dune index 3e77fdb21967..991ff1d7d4dd 100644 --- a/src/proto_012_Psithaca/lib_client_commands/dune +++ b/src/proto_012_Psithaca/lib_client_commands/dune @@ -18,6 +18,7 @@ (library_flags (:standard -linkall)) (modules (:standard \ alpha_commands_registration)) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_012_Psithaca -open Tezos_stdlib_unix -open Tezos_shell_services @@ -46,6 +47,7 @@ (library_flags (:standard -linkall)) (modules alpha_commands_registration) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_012_Psithaca -open Tezos_shell_services -open Tezos_client_base diff --git a/src/proto_012_Psithaca/lib_client_sapling/dune b/src/proto_012_Psithaca/lib_client_sapling/dune index 63c9daec2303..c59b9c22f56b 100644 --- a/src/proto_012_Psithaca/lib_client_sapling/dune +++ b/src/proto_012_Psithaca/lib_client_sapling/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_stdlib_unix -open Tezos_client_base -open Tezos_client_012_Psithaca diff --git a/src/proto_012_Psithaca/lib_delegate/dune b/src/proto_012_Psithaca/lib_delegate/dune index 74c0445e7db0..3a7a68fa6161 100644 --- a/src/proto_012_Psithaca/lib_delegate/dune +++ b/src/proto_012_Psithaca/lib_delegate/dune @@ -26,6 +26,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_012_Psithaca -open Tezos_protocol_plugin_012_Psithaca -open Tezos_shell_services @@ -59,6 +60,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_012_Psithaca -open Tezos_stdlib_unix -open Tezos_shell_services @@ -88,6 +90,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_012_Psithaca -open Tezos_shell_services -open Tezos_client_base diff --git a/src/proto_012_Psithaca/lib_delegate/test/dune b/src/proto_012_Psithaca/lib_delegate/test/dune index d9acc6a9f69a..877793caa21d 100644 --- a/src/proto_012_Psithaca/lib_delegate/test/dune +++ b/src/proto_012_Psithaca/lib_delegate/test/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_client_012_Psithaca -open Tezos_protocol_012_Psithaca diff --git a/src/proto_012_Psithaca/lib_delegate/test/mockup_simulator/dune b/src/proto_012_Psithaca/lib_delegate/test/mockup_simulator/dune index b3135c62603b..256c14e25cb5 100644 --- a/src/proto_012_Psithaca/lib_delegate/test/mockup_simulator/dune +++ b/src/proto_012_Psithaca/lib_delegate/test/mockup_simulator/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_012_Psithaca -open Tezos_client_012_Psithaca -open Tezos_client_commands diff --git a/src/proto_012_Psithaca/lib_plugin/dune b/src/proto_012_Psithaca/lib_plugin/dune index b54e9d401917..e3f1218fdca2 100644 --- a/src/proto_012_Psithaca/lib_plugin/dune +++ b/src/proto_012_Psithaca/lib_plugin/dune @@ -8,6 +8,7 @@ ) (modules (:standard) \ Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_012_Psithaca -open Tezos_stdlib_unix ))) @@ -22,6 +23,7 @@ tezos-shell) (modules Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_embedded_protocol_012_Psithaca -open Tezos_protocol_plugin_012_Psithaca -open Tezos_shell))) diff --git a/src/proto_012_Psithaca/lib_plugin/test/dune b/src/proto_012_Psithaca/lib_plugin/test/dune index 745b734544f8..a3f7689f9ac3 100644 --- a/src/proto_012_Psithaca/lib_plugin/test/dune +++ b/src/proto_012_Psithaca/lib_plugin/test/dune @@ -11,6 +11,7 @@ tezos-protocol-plugin-012-Psithaca tezos-012-Psithaca-test-helpers) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_base_test_helpers -open Tezos_micheline -open Tezos_protocol_012_Psithaca diff --git a/src/proto_012_Psithaca/lib_protocol/test/helpers/dune b/src/proto_012_Psithaca/lib_protocol/test/helpers/dune index ce08a5f18a55..8b54ed5997b1 100644 --- a/src/proto_012_Psithaca/lib_protocol/test/helpers/dune +++ b/src/proto_012_Psithaca/lib_protocol/test/helpers/dune @@ -15,6 +15,7 @@ tezos-client-012-Psithaca tezos-protocol-plugin-012-Psithaca) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_stdlib_unix -open Tezos_protocol_012_Psithaca diff --git a/src/proto_012_Psithaca/lib_protocol/test/integration/consensus/dune b/src/proto_012_Psithaca/lib_protocol/test/integration/consensus/dune index 538b75ee9e9a..edaec8f7fb12 100644 --- a/src/proto_012_Psithaca/lib_protocol/test/integration/consensus/dune +++ b/src/proto_012_Psithaca/lib_protocol/test/integration/consensus/dune @@ -9,6 +9,7 @@ tezos-protocol-012-Psithaca-parameters tezos-protocol-plugin-012-Psithaca) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_012_Psithaca -open Tezos_012_Psithaca_test_helpers -open Tezos_base_test_helpers diff --git a/src/proto_012_Psithaca/lib_protocol/test/integration/dune b/src/proto_012_Psithaca/lib_protocol/test/integration/dune index a3b5fb0e2e41..bb29d21f4030 100644 --- a/src/proto_012_Psithaca/lib_protocol/test/integration/dune +++ b/src/proto_012_Psithaca/lib_protocol/test/integration/dune @@ -9,6 +9,7 @@ tezos-base-test-helpers tezos-012-Psithaca-test-helpers) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_client_012_Psithaca -open Tezos_protocol_012_Psithaca -open Tezos_protocol_012_Psithaca_parameters diff --git a/src/proto_012_Psithaca/lib_protocol/test/integration/gas/dune b/src/proto_012_Psithaca/lib_protocol/test/integration/gas/dune index 1dbdf2a308c1..fa0cc2be74d5 100644 --- a/src/proto_012_Psithaca/lib_protocol/test/integration/gas/dune +++ b/src/proto_012_Psithaca/lib_protocol/test/integration/gas/dune @@ -7,6 +7,7 @@ tezos-base-test-helpers tezos-012-Psithaca-test-helpers) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_012_Psithaca -open Tezos_012_Psithaca_test_helpers -open Tezos_base_test_helpers))) diff --git a/src/proto_012_Psithaca/lib_protocol/test/integration/michelson/dune b/src/proto_012_Psithaca/lib_protocol/test/integration/michelson/dune index 5c56b5e04e80..bbc0933ad78a 100644 --- a/src/proto_012_Psithaca/lib_protocol/test/integration/michelson/dune +++ b/src/proto_012_Psithaca/lib_protocol/test/integration/michelson/dune @@ -13,6 +13,7 @@ tezos-benchmark tezos-benchmark-012-Psithaca) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_012_Psithaca -open Tezos_012_Psithaca_test_helpers -open Tezos_base_test_helpers diff --git a/src/proto_012_Psithaca/lib_protocol/test/integration/operations/dune b/src/proto_012_Psithaca/lib_protocol/test/integration/operations/dune index 1dbdf2a308c1..fa0cc2be74d5 100644 --- a/src/proto_012_Psithaca/lib_protocol/test/integration/operations/dune +++ b/src/proto_012_Psithaca/lib_protocol/test/integration/operations/dune @@ -7,6 +7,7 @@ tezos-base-test-helpers tezos-012-Psithaca-test-helpers) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_012_Psithaca -open Tezos_012_Psithaca_test_helpers -open Tezos_base_test_helpers))) diff --git a/src/proto_012_Psithaca/lib_protocol/test/pbt/dune b/src/proto_012_Psithaca/lib_protocol/test/pbt/dune index 17bd6521b16d..88e4306ce14c 100644 --- a/src/proto_012_Psithaca/lib_protocol/test/pbt/dune +++ b/src/proto_012_Psithaca/lib_protocol/test/pbt/dune @@ -17,6 +17,7 @@ tezos-benchmark-012-Psithaca) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_client_012_Psithaca -open Tezos_protocol_012_Psithaca diff --git a/src/proto_012_Psithaca/lib_protocol/test/unit/dune b/src/proto_012_Psithaca/lib_protocol/test/unit/dune index 096fe8c7229e..65337fde242c 100644 --- a/src/proto_012_Psithaca/lib_protocol/test/unit/dune +++ b/src/proto_012_Psithaca/lib_protocol/test/unit/dune @@ -11,6 +11,7 @@ tezos-protocol-012-Psithaca-parameters tezos-base-test-helpers) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_base_test_helpers -open Tezos_micheline -open Tezos_client_012_Psithaca diff --git a/src/proto_alpha/bin_accuser/dune b/src/proto_alpha/bin_accuser/dune index cb3de5394e2a..cba7f2c31e05 100644 --- a/src/proto_alpha/bin_accuser/dune +++ b/src/proto_alpha/bin_accuser/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha -open Tezos_client_alpha -open Tezos_client_commands diff --git a/src/proto_alpha/bin_baker/dune b/src/proto_alpha/bin_baker/dune index b66dfcc02f08..09974dd4e13a 100644 --- a/src/proto_alpha/bin_baker/dune +++ b/src/proto_alpha/bin_baker/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha -open Tezos_client_alpha -open Tezos_client_commands diff --git a/src/proto_alpha/bin_sc_rollup_client/dune b/src/proto_alpha/bin_sc_rollup_client/dune index c069d06047f8..f2a3126be82f 100644 --- a/src/proto_alpha/bin_sc_rollup_client/dune +++ b/src/proto_alpha/bin_sc_rollup_client/dune @@ -19,6 +19,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_client_alpha -open Tezos_client_commands -open Tezos_stdlib_unix diff --git a/src/proto_alpha/bin_sc_rollup_node/dune b/src/proto_alpha/bin_sc_rollup_node/dune index 7199d7bbdbca..cd483a6a2efb 100644 --- a/src/proto_alpha/bin_sc_rollup_node/dune +++ b/src/proto_alpha/bin_sc_rollup_node/dune @@ -31,6 +31,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_client_commands -open Tezos_stdlib_unix -open Tezos_client_base diff --git a/src/proto_alpha/bin_tx_rollup_node/dune b/src/proto_alpha/bin_tx_rollup_node/dune index cb5f701ff22f..7b2e1631beab 100644 --- a/src/proto_alpha/bin_tx_rollup_node/dune +++ b/src/proto_alpha/bin_tx_rollup_node/dune @@ -28,6 +28,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_base -open Tezos_crypto -open Tezos_protocol_alpha diff --git a/src/proto_alpha/lib_benchmark/dune b/src/proto_alpha/lib_benchmark/dune index 68d4e869cb74..7ba6dead5562 100644 --- a/src/proto_alpha/lib_benchmark/dune +++ b/src/proto_alpha/lib_benchmark/dune @@ -17,6 +17,7 @@ (flags (:standard -open Tezos_stdlib -open Tezos_base -open Tezos_error_monad + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_micheline_rewriting -open Tezos_benchmark diff --git a/src/proto_alpha/lib_benchmark/test/dune b/src/proto_alpha/lib_benchmark/test/dune index 0a2cdf72c315..a0e0f8510679 100644 --- a/src/proto_alpha/lib_benchmark/test/dune +++ b/src/proto_alpha/lib_benchmark/test/dune @@ -13,6 +13,7 @@ ;; uncomment to enable gprof profiling ;; (ocamlopt_flags (:standard -p -ccopt -no-pie)) (flags (:standard + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_protocol_alpha -open Tezos_benchmark diff --git a/src/proto_alpha/lib_benchmarks_proto/dune b/src/proto_alpha/lib_benchmarks_proto/dune index 3a97d84b9c8c..905e71a06522 100644 --- a/src/proto_alpha/lib_benchmarks_proto/dune +++ b/src/proto_alpha/lib_benchmarks_proto/dune @@ -27,6 +27,7 @@ -open Tezos_stdlib -open Tezos_base -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_error_monad -open Tezos_benchmark -open Tezos_benchmark_alpha diff --git a/src/proto_alpha/lib_client/dune b/src/proto_alpha/lib_client/dune index 2e95ca430eff..324a2f36b7fd 100644 --- a/src/proto_alpha/lib_client/dune +++ b/src/proto_alpha/lib_client/dune @@ -19,6 +19,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_alpha diff --git a/src/proto_alpha/lib_client/test/dune b/src/proto_alpha/lib_client/test/dune index b79cbf2f3cb7..c9bc210b11ce 100644 --- a/src/proto_alpha/lib_client/test/dune +++ b/src/proto_alpha/lib_client/test/dune @@ -17,6 +17,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_client_alpha -open Tezos_protocol_alpha diff --git a/src/proto_alpha/lib_client_commands/dune b/src/proto_alpha/lib_client_commands/dune index 8f9daaf54e8b..d3783b425ed9 100644 --- a/src/proto_alpha/lib_client_commands/dune +++ b/src/proto_alpha/lib_client_commands/dune @@ -19,6 +19,7 @@ (library_flags (:standard -linkall)) (modules (:standard \ alpha_commands_registration)) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha -open Tezos_protocol_alpha_parameters -open Tezos_stdlib_unix @@ -49,6 +50,7 @@ (library_flags (:standard -linkall)) (modules alpha_commands_registration) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha -open Tezos_protocol_alpha_parameters -open Tezos_shell_services diff --git a/src/proto_alpha/lib_client_sapling/dune b/src/proto_alpha/lib_client_sapling/dune index 1c4179a37603..02850971c035 100644 --- a/src/proto_alpha/lib_client_sapling/dune +++ b/src/proto_alpha/lib_client_sapling/dune @@ -17,6 +17,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_stdlib_unix -open Tezos_client_base -open Tezos_client_alpha diff --git a/src/proto_alpha/lib_delegate/dune b/src/proto_alpha/lib_delegate/dune index 5133e407968b..03c733df55ca 100644 --- a/src/proto_alpha/lib_delegate/dune +++ b/src/proto_alpha/lib_delegate/dune @@ -26,6 +26,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha -open Tezos_protocol_plugin_alpha -open Tezos_shell_services @@ -59,6 +60,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha -open Tezos_stdlib_unix -open Tezos_shell_services diff --git a/src/proto_alpha/lib_delegate/test/dune b/src/proto_alpha/lib_delegate/test/dune index 06701d59031f..2d64ebb7757c 100644 --- a/src/proto_alpha/lib_delegate/test/dune +++ b/src/proto_alpha/lib_delegate/test/dune @@ -16,6 +16,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_client_alpha -open Tezos_protocol_alpha diff --git a/src/proto_alpha/lib_delegate/test/mockup_simulator/dune b/src/proto_alpha/lib_delegate/test/mockup_simulator/dune index e09d30d0d3fa..8b41b35b0f10 100644 --- a/src/proto_alpha/lib_delegate/test/mockup_simulator/dune +++ b/src/proto_alpha/lib_delegate/test/mockup_simulator/dune @@ -17,6 +17,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha -open Tezos_client_alpha -open Tezos_client_commands diff --git a/src/proto_alpha/lib_delegate/test/tenderbrute/dune b/src/proto_alpha/lib_delegate/test/tenderbrute/dune index 6346e2a3c503..b38203307c13 100644 --- a/src/proto_alpha/lib_delegate/test/tenderbrute/dune +++ b/src/proto_alpha/lib_delegate/test/tenderbrute/dune @@ -10,6 +10,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_base -open Tezos_client_base -open Tezos_client_alpha diff --git a/src/proto_alpha/lib_delegate/test/tenderbrute/lib/dune b/src/proto_alpha/lib_delegate/test/tenderbrute/lib/dune index 13120e68bf2e..aa5e9046ce0a 100644 --- a/src/proto_alpha/lib_delegate/test/tenderbrute/lib/dune +++ b/src/proto_alpha/lib_delegate/test/tenderbrute/lib/dune @@ -12,6 +12,7 @@ (:standard -open Data_encoding -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_base -open Tezos_protocol_alpha -open Tezos_client_base diff --git a/src/proto_alpha/lib_plugin/dune b/src/proto_alpha/lib_plugin/dune index 3895ee7da4e4..41a57bfea184 100644 --- a/src/proto_alpha/lib_plugin/dune +++ b/src/proto_alpha/lib_plugin/dune @@ -7,6 +7,7 @@ ) (modules (:standard) \ Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha ))) @@ -20,6 +21,7 @@ tezos-shell) (modules Plugin_registerer) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_embedded_protocol_alpha -open Tezos_protocol_plugin_alpha -open Tezos_shell))) diff --git a/src/proto_alpha/lib_plugin/test/dune b/src/proto_alpha/lib_plugin/test/dune index 4c2fab37aaa2..37fb49f6b397 100644 --- a/src/proto_alpha/lib_plugin/test/dune +++ b/src/proto_alpha/lib_plugin/test/dune @@ -13,6 +13,7 @@ tezos-alpha-test-helpers ) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_base_test_helpers -open Tezos_micheline -open Tezos_protocol_alpha diff --git a/src/proto_alpha/lib_protocol/test/helpers/dune b/src/proto_alpha/lib_protocol/test/helpers/dune index 0ec09e52df09..9e27a8e32c7c 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/dune +++ b/src/proto_alpha/lib_protocol/test/helpers/dune @@ -15,6 +15,7 @@ tezos-client-alpha tezos-protocol-plugin-alpha) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_stdlib_unix -open Tezos_protocol_alpha diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/dune b/src/proto_alpha/lib_protocol/test/integration/consensus/dune index 14d67879ca7e..4cc8ec25ae1c 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/dune +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/dune @@ -9,6 +9,7 @@ tezos-protocol-alpha-parameters tezos-protocol-plugin-alpha) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha -open Tezos_alpha_test_helpers -open Tezos_base_test_helpers diff --git a/src/proto_alpha/lib_protocol/test/integration/dune b/src/proto_alpha/lib_protocol/test/integration/dune index 62d9ef8a44e4..8f92ac79237d 100644 --- a/src/proto_alpha/lib_protocol/test/integration/dune +++ b/src/proto_alpha/lib_protocol/test/integration/dune @@ -9,6 +9,7 @@ tezos-base-test-helpers tezos-alpha-test-helpers) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_client_alpha -open Tezos_protocol_alpha -open Tezos_protocol_alpha_parameters diff --git a/src/proto_alpha/lib_protocol/test/integration/gas/dune b/src/proto_alpha/lib_protocol/test/integration/gas/dune index 60fcd15cc751..3e8544633c81 100644 --- a/src/proto_alpha/lib_protocol/test/integration/gas/dune +++ b/src/proto_alpha/lib_protocol/test/integration/gas/dune @@ -7,6 +7,7 @@ tezos-base-test-helpers tezos-alpha-test-helpers) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha -open Tezos_alpha_test_helpers -open Tezos_base_test_helpers))) diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/dune b/src/proto_alpha/lib_protocol/test/integration/michelson/dune index ee14c3ffb8bb..68d240da1db2 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/dune +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/dune @@ -15,6 +15,7 @@ tezos-benchmark tezos-benchmark-alpha) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha -open Tezos_alpha_test_helpers -open Tezos_base_test_helpers diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/dune b/src/proto_alpha/lib_protocol/test/integration/operations/dune index 13babc23c207..e8d813492295 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/dune +++ b/src/proto_alpha/lib_protocol/test/integration/operations/dune @@ -8,6 +8,7 @@ tezos-base-test-helpers tezos-alpha-test-helpers) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_protocol_alpha -open Tezos_client_alpha -open Tezos_alpha_test_helpers diff --git a/src/proto_alpha/lib_protocol/test/pbt/dune b/src/proto_alpha/lib_protocol/test/pbt/dune index 71dca108c8c3..65bbc730a201 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/dune +++ b/src/proto_alpha/lib_protocol/test/pbt/dune @@ -23,6 +23,7 @@ tezos-benchmark-alpha) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_micheline -open Tezos_client_alpha -open Tezos_protocol_alpha diff --git a/src/proto_alpha/lib_protocol/test/unit/dune b/src/proto_alpha/lib_protocol/test/unit/dune index ae6d11a0d9a6..2a375a55c217 100644 --- a/src/proto_alpha/lib_protocol/test/unit/dune +++ b/src/proto_alpha/lib_protocol/test/unit/dune @@ -11,6 +11,7 @@ tezos-protocol-alpha-parameters tezos-base-test-helpers) (flags (:standard -open Tezos_base__TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_base_test_helpers -open Tezos_micheline -open Tezos_client_alpha diff --git a/src/proto_demo_counter/lib_client/dune b/src/proto_demo_counter/lib_client/dune index c7fe46cc8350..67387e882fc9 100644 --- a/src/proto_demo_counter/lib_client/dune +++ b/src/proto_demo_counter/lib_client/dune @@ -14,6 +14,7 @@ -w -9+27-30-32-40@8 -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_client_commands diff --git a/src/proto_genesis/lib_client/dune b/src/proto_genesis/lib_client/dune index 115be0aa9399..2df84bb86c82 100644 --- a/src/proto_genesis/lib_client/dune +++ b/src/proto_genesis/lib_client/dune @@ -15,6 +15,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_genesis diff --git a/src/proto_genesis_carthagenet/lib_client/dune b/src/proto_genesis_carthagenet/lib_client/dune index 024946b1023d..ff1e6ff2edba 100644 --- a/src/proto_genesis_carthagenet/lib_client/dune +++ b/src/proto_genesis_carthagenet/lib_client/dune @@ -14,6 +14,7 @@ (flags (:standard -open Tezos_base.TzPervasives + -open Tezos_base.TzPervasives.Error_monad.Legacy_monad_globals -open Tezos_shell_services -open Tezos_client_base -open Tezos_protocol_genesis_carthagenet -- GitLab From 539e05852b24f437c1b58740376cd931acade9a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Mon, 14 Mar 2022 18:17:07 +0100 Subject: [PATCH 4/5] Protos(all): avoid explicit namespacing of legacy `ok`/`error` No change to the actual protos, just the lib_client/, lib_benchmark/, etc. The `ok` and `error` functions are now in an explicitely opened legacy namespace. They have moved, their legacy namespace-address needs to be changed. --- .../lib_client/managed_contract.ml | 3 +-- .../lib_client/managed_contract.ml | 3 +-- .../lib_client/client_proto_multisig.ml | 18 ++++++++---------- .../lib_client/managed_contract.ml | 3 +-- .../lib_client/client_proto_multisig.ml | 18 ++++++++---------- .../lib_client/managed_contract.ml | 3 +-- .../lib_client/client_proto_multisig.ml | 18 ++++++++---------- .../lib_client/managed_contract.ml | 3 +-- .../lib_benchmark/execution_context.ml | 1 - .../lib_benchmark/test/test_helpers.ml | 2 -- .../translator_benchmarks.ml | 3 --- .../lib_client/client_proto_multisig.ml | 18 ++++++++---------- .../lib_client/managed_contract.ml | 3 +-- .../lib_delegate/client_baking_forge.ml | 2 +- .../lib_benchmark/execution_context.ml | 1 - .../lib_benchmark/test/test_helpers.ml | 2 -- .../translator_benchmarks.ml | 4 ---- .../lib_client/client_proto_multisig.ml | 18 ++++++++---------- .../lib_client/managed_contract.ml | 3 +-- .../lib_delegate/liquidity_baking_vote_file.ml | 2 +- .../lib_benchmark/execution_context.ml | 1 - .../lib_benchmark/test/test_helpers.ml | 2 -- .../translator_benchmarks.ml | 4 ---- .../lib_client/client_proto_multisig.ml | 18 ++++++++---------- src/proto_alpha/lib_client/managed_contract.ml | 3 +-- .../lib_delegate/liquidity_baking_vote_file.ml | 2 +- src/proto_alpha/lib_plugin/plugin.ml | 2 +- 27 files changed, 60 insertions(+), 100 deletions(-) diff --git a/src/proto_005_PsBabyM1/lib_client/managed_contract.ml b/src/proto_005_PsBabyM1/lib_client/managed_contract.ml index e198660a53c2..84a5e4208667 100644 --- a/src/proto_005_PsBabyM1/lib_client/managed_contract.ml +++ b/src/proto_005_PsBabyM1/lib_client/managed_contract.ml @@ -71,8 +71,7 @@ let parse code = Lwt.return ( Micheline_parser.no_parsing_error @@ Michelson_v1_parser.parse_expression code - >>? fun exp -> - Error_monad.ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) + >>? fun exp -> ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) let set_delegate (cctxt : #full) ~chain ~block ?confirmations ?dry_run ?verbose_signing ?branch ~fee_parameter ?fee ~source ~src_pk ~src_sk diff --git a/src/proto_006_PsCARTHA/lib_client/managed_contract.ml b/src/proto_006_PsCARTHA/lib_client/managed_contract.ml index a6c895bd0a26..73cceaf22533 100644 --- a/src/proto_006_PsCARTHA/lib_client/managed_contract.ml +++ b/src/proto_006_PsCARTHA/lib_client/managed_contract.ml @@ -71,8 +71,7 @@ let parse code = Lwt.return ( Micheline_parser.no_parsing_error @@ Michelson_v1_parser.parse_expression code - >>? fun exp -> - Error_monad.ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) + >>? fun exp -> ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) let set_delegate (cctxt : #full) ~chain ~block ?confirmations ?dry_run ?verbose_signing ?branch ~fee_parameter ?fee ~source ~src_pk ~src_sk diff --git a/src/proto_008_PtEdo2Zk/lib_client/client_proto_multisig.ml b/src/proto_008_PtEdo2Zk/lib_client/client_proto_multisig.ml index 9de5516df8df..8a58d78c925f 100644 --- a/src/proto_008_PtEdo2Zk/lib_client/client_proto_multisig.ml +++ b/src/proto_008_PtEdo2Zk/lib_client/client_proto_multisig.ml @@ -644,8 +644,7 @@ let action_to_expr_generic ~loc = function ~parameter ~amount >|? left ~loc) - | Lambda code -> - Error_monad.ok Tezos_micheline.Micheline.(left ~loc (root code)) + | Lambda code -> ok Tezos_micheline.Micheline.(left ~loc (root code)) | Change_delegate delegate -> lambda_from_string @@ Managed_contract.build_lambda_for_set_delegate ~delegate @@ -653,37 +652,36 @@ let action_to_expr_generic ~loc = function | Change_keys (threshold, keys) -> let optimized_keys = seq ~loc (List.map (optimized_key ~loc) keys) in let expr = right ~loc (pair ~loc (int ~loc threshold) optimized_keys) in - Error_monad.ok expr + ok expr let action_to_expr_legacy ~loc = function | Transfer {amount; destination; entrypoint; parameter_type; parameter} -> if parameter <> Tezos_micheline.Micheline.strip_locations (unit ~loc:0) - then Error_monad.error @@ Unsupported_feature_generic_call parameter + then error @@ Unsupported_feature_generic_call parameter else if parameter_type <> Tezos_micheline.Micheline.strip_locations (unit_t ~loc:0) - then - Error_monad.error @@ Unsupported_feature_generic_call_ty parameter_type + then error @@ Unsupported_feature_generic_call_ty parameter_type else - Error_monad.ok + ok @@ left ~loc (pair ~loc (mutez ~loc amount) (optimized_address ~loc ~address:destination ~entrypoint)) - | Lambda _ -> Error_monad.error @@ Unsupported_feature_lambda "" + | Lambda _ -> error @@ Unsupported_feature_lambda "" | Change_delegate delegate -> let delegate_opt = match delegate with | None -> none ~loc () | Some delegate -> some ~loc (optimized_key_hash ~loc delegate) in - Error_monad.ok @@ right ~loc (left ~loc delegate_opt) + ok @@ right ~loc (left ~loc delegate_opt) | Change_keys (threshold, keys) -> let optimized_keys = seq ~loc (List.map (optimized_key ~loc) keys) in let expr = right ~loc (pair ~loc (int ~loc threshold) optimized_keys) in - Error_monad.ok (right ~loc expr) + ok (right ~loc expr) let action_to_expr ~loc ~generic action = if generic then action_to_expr_generic ~loc action diff --git a/src/proto_008_PtEdo2Zk/lib_client/managed_contract.ml b/src/proto_008_PtEdo2Zk/lib_client/managed_contract.ml index d043f048b6e1..8dc8f7f8d499 100644 --- a/src/proto_008_PtEdo2Zk/lib_client/managed_contract.ml +++ b/src/proto_008_PtEdo2Zk/lib_client/managed_contract.ml @@ -81,8 +81,7 @@ let parse code = Lwt.return ( Micheline_parser.no_parsing_error @@ Michelson_v1_parser.parse_expression code - >>? fun exp -> - Error_monad.ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) + >>? fun exp -> ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) let build_lambda_for_set_delegate ~delegate = match delegate with diff --git a/src/proto_009_PsFLoren/lib_client/client_proto_multisig.ml b/src/proto_009_PsFLoren/lib_client/client_proto_multisig.ml index 9de5516df8df..8a58d78c925f 100644 --- a/src/proto_009_PsFLoren/lib_client/client_proto_multisig.ml +++ b/src/proto_009_PsFLoren/lib_client/client_proto_multisig.ml @@ -644,8 +644,7 @@ let action_to_expr_generic ~loc = function ~parameter ~amount >|? left ~loc) - | Lambda code -> - Error_monad.ok Tezos_micheline.Micheline.(left ~loc (root code)) + | Lambda code -> ok Tezos_micheline.Micheline.(left ~loc (root code)) | Change_delegate delegate -> lambda_from_string @@ Managed_contract.build_lambda_for_set_delegate ~delegate @@ -653,37 +652,36 @@ let action_to_expr_generic ~loc = function | Change_keys (threshold, keys) -> let optimized_keys = seq ~loc (List.map (optimized_key ~loc) keys) in let expr = right ~loc (pair ~loc (int ~loc threshold) optimized_keys) in - Error_monad.ok expr + ok expr let action_to_expr_legacy ~loc = function | Transfer {amount; destination; entrypoint; parameter_type; parameter} -> if parameter <> Tezos_micheline.Micheline.strip_locations (unit ~loc:0) - then Error_monad.error @@ Unsupported_feature_generic_call parameter + then error @@ Unsupported_feature_generic_call parameter else if parameter_type <> Tezos_micheline.Micheline.strip_locations (unit_t ~loc:0) - then - Error_monad.error @@ Unsupported_feature_generic_call_ty parameter_type + then error @@ Unsupported_feature_generic_call_ty parameter_type else - Error_monad.ok + ok @@ left ~loc (pair ~loc (mutez ~loc amount) (optimized_address ~loc ~address:destination ~entrypoint)) - | Lambda _ -> Error_monad.error @@ Unsupported_feature_lambda "" + | Lambda _ -> error @@ Unsupported_feature_lambda "" | Change_delegate delegate -> let delegate_opt = match delegate with | None -> none ~loc () | Some delegate -> some ~loc (optimized_key_hash ~loc delegate) in - Error_monad.ok @@ right ~loc (left ~loc delegate_opt) + ok @@ right ~loc (left ~loc delegate_opt) | Change_keys (threshold, keys) -> let optimized_keys = seq ~loc (List.map (optimized_key ~loc) keys) in let expr = right ~loc (pair ~loc (int ~loc threshold) optimized_keys) in - Error_monad.ok (right ~loc expr) + ok (right ~loc expr) let action_to_expr ~loc ~generic action = if generic then action_to_expr_generic ~loc action diff --git a/src/proto_009_PsFLoren/lib_client/managed_contract.ml b/src/proto_009_PsFLoren/lib_client/managed_contract.ml index 7a87968322c3..ac99cad8a926 100644 --- a/src/proto_009_PsFLoren/lib_client/managed_contract.ml +++ b/src/proto_009_PsFLoren/lib_client/managed_contract.ml @@ -81,8 +81,7 @@ let parse code = Lwt.return ( Micheline_parser.no_parsing_error @@ Michelson_v1_parser.parse_expression code - >>? fun exp -> - Error_monad.ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) + >>? fun exp -> ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) let build_lambda_for_set_delegate ~delegate = match delegate with diff --git a/src/proto_010_PtGRANAD/lib_client/client_proto_multisig.ml b/src/proto_010_PtGRANAD/lib_client/client_proto_multisig.ml index 14c0667b99b9..616cc64d4d94 100644 --- a/src/proto_010_PtGRANAD/lib_client/client_proto_multisig.ml +++ b/src/proto_010_PtGRANAD/lib_client/client_proto_multisig.ml @@ -627,8 +627,7 @@ let action_to_expr_generic ~loc = function ~parameter ~amount >|? left ~loc) - | Lambda code -> - Error_monad.ok Tezos_micheline.Micheline.(left ~loc (root code)) + | Lambda code -> ok Tezos_micheline.Micheline.(left ~loc (root code)) | Change_delegate delegate -> lambda_from_string @@ Managed_contract.build_lambda_for_set_delegate ~delegate @@ -636,37 +635,36 @@ let action_to_expr_generic ~loc = function | Change_keys (threshold, keys) -> let optimized_keys = seq ~loc (List.map (optimized_key ~loc) keys) in let expr = right ~loc (pair ~loc (int ~loc threshold) optimized_keys) in - Error_monad.ok expr + ok expr let action_to_expr_legacy ~loc = function | Transfer {amount; destination; entrypoint; parameter_type; parameter} -> if parameter <> Tezos_micheline.Micheline.strip_locations (unit ~loc:0) - then Error_monad.error @@ Unsupported_feature_generic_call parameter + then error @@ Unsupported_feature_generic_call parameter else if parameter_type <> Tezos_micheline.Micheline.strip_locations (unit_t ~loc:0) - then - Error_monad.error @@ Unsupported_feature_generic_call_ty parameter_type + then error @@ Unsupported_feature_generic_call_ty parameter_type else - Error_monad.ok + ok @@ left ~loc (pair ~loc (mutez ~loc amount) (optimized_address ~loc ~address:destination ~entrypoint)) - | Lambda _ -> Error_monad.error @@ Unsupported_feature_lambda "" + | Lambda _ -> error @@ Unsupported_feature_lambda "" | Change_delegate delegate -> let delegate_opt = match delegate with | None -> none ~loc () | Some delegate -> some ~loc (optimized_key_hash ~loc delegate) in - Error_monad.ok @@ right ~loc (left ~loc delegate_opt) + ok @@ right ~loc (left ~loc delegate_opt) | Change_keys (threshold, keys) -> let optimized_keys = seq ~loc (List.map (optimized_key ~loc) keys) in let expr = right ~loc (pair ~loc (int ~loc threshold) optimized_keys) in - Error_monad.ok (right ~loc expr) + ok (right ~loc expr) let action_to_expr ~loc ~generic action = if generic then action_to_expr_generic ~loc action diff --git a/src/proto_010_PtGRANAD/lib_client/managed_contract.ml b/src/proto_010_PtGRANAD/lib_client/managed_contract.ml index 29bb3d976b63..910f27a6d9b3 100644 --- a/src/proto_010_PtGRANAD/lib_client/managed_contract.ml +++ b/src/proto_010_PtGRANAD/lib_client/managed_contract.ml @@ -82,8 +82,7 @@ let parse code = Lwt.return ( Micheline_parser.no_parsing_error @@ Michelson_v1_parser.parse_expression code - >>? fun exp -> - Error_monad.ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) + >>? fun exp -> ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) let build_lambda_for_set_delegate ~delegate = match delegate with diff --git a/src/proto_011_PtHangz2/lib_benchmark/execution_context.ml b/src/proto_011_PtHangz2/lib_benchmark/execution_context.ml index 6e5251a9c539..3ee66a81f98b 100644 --- a/src/proto_011_PtHangz2/lib_benchmark/execution_context.ml +++ b/src/proto_011_PtHangz2/lib_benchmark/execution_context.ml @@ -24,7 +24,6 @@ (*****************************************************************************) open Protocol -open Error_monad type context = Alpha_context.context * Script_interpreter.step_constants diff --git a/src/proto_011_PtHangz2/lib_benchmark/test/test_helpers.ml b/src/proto_011_PtHangz2/lib_benchmark/test/test_helpers.ml index 73e6ed7527d2..e79f70c264ac 100644 --- a/src/proto_011_PtHangz2/lib_benchmark/test/test_helpers.ml +++ b/src/proto_011_PtHangz2/lib_benchmark/test/test_helpers.ml @@ -23,8 +23,6 @@ (* *) (*****************************************************************************) -open Tezos_error_monad.Error_monad - let rng_state = Random.State.make [|42; 987897; 54120|] let print_script_expr fmtr (expr : Protocol.Script_repr.expr) = diff --git a/src/proto_011_PtHangz2/lib_benchmarks_proto/translator_benchmarks.ml b/src/proto_011_PtHangz2/lib_benchmarks_proto/translator_benchmarks.ml index ce6eda4504d6..86a739220a00 100644 --- a/src/proto_011_PtHangz2/lib_benchmarks_proto/translator_benchmarks.ml +++ b/src/proto_011_PtHangz2/lib_benchmarks_proto/translator_benchmarks.ml @@ -570,7 +570,6 @@ module Merge_types : Benchmark.S = struct [("size_translator_model", size_model); ("codegen", codegen_model)] let merge_type_benchmark rng_state nodes (ty : Script_ir_translator.ex_ty) = - let open Error_monad in Lwt_main.run ( Execution_context.make ~rng_state >>=? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in @@ -681,7 +680,6 @@ module Parse_type_benchmark : Benchmark.S = struct let info = "Benchmarking parse_ty" let make_bench rng_state config () = - let open Error_monad in ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in let depth = Random.State.int rng_state config.max_size in @@ -729,7 +727,6 @@ module Unparse_type_benchmark : Benchmark.S = struct let info = "Benchmarking unparse_ty" let make_bench rng_state config () = - let open Error_monad in ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in let depth = Random.State.int rng_state config.max_size in diff --git a/src/proto_011_PtHangz2/lib_client/client_proto_multisig.ml b/src/proto_011_PtHangz2/lib_client/client_proto_multisig.ml index 14c0667b99b9..616cc64d4d94 100644 --- a/src/proto_011_PtHangz2/lib_client/client_proto_multisig.ml +++ b/src/proto_011_PtHangz2/lib_client/client_proto_multisig.ml @@ -627,8 +627,7 @@ let action_to_expr_generic ~loc = function ~parameter ~amount >|? left ~loc) - | Lambda code -> - Error_monad.ok Tezos_micheline.Micheline.(left ~loc (root code)) + | Lambda code -> ok Tezos_micheline.Micheline.(left ~loc (root code)) | Change_delegate delegate -> lambda_from_string @@ Managed_contract.build_lambda_for_set_delegate ~delegate @@ -636,37 +635,36 @@ let action_to_expr_generic ~loc = function | Change_keys (threshold, keys) -> let optimized_keys = seq ~loc (List.map (optimized_key ~loc) keys) in let expr = right ~loc (pair ~loc (int ~loc threshold) optimized_keys) in - Error_monad.ok expr + ok expr let action_to_expr_legacy ~loc = function | Transfer {amount; destination; entrypoint; parameter_type; parameter} -> if parameter <> Tezos_micheline.Micheline.strip_locations (unit ~loc:0) - then Error_monad.error @@ Unsupported_feature_generic_call parameter + then error @@ Unsupported_feature_generic_call parameter else if parameter_type <> Tezos_micheline.Micheline.strip_locations (unit_t ~loc:0) - then - Error_monad.error @@ Unsupported_feature_generic_call_ty parameter_type + then error @@ Unsupported_feature_generic_call_ty parameter_type else - Error_monad.ok + ok @@ left ~loc (pair ~loc (mutez ~loc amount) (optimized_address ~loc ~address:destination ~entrypoint)) - | Lambda _ -> Error_monad.error @@ Unsupported_feature_lambda "" + | Lambda _ -> error @@ Unsupported_feature_lambda "" | Change_delegate delegate -> let delegate_opt = match delegate with | None -> none ~loc () | Some delegate -> some ~loc (optimized_key_hash ~loc delegate) in - Error_monad.ok @@ right ~loc (left ~loc delegate_opt) + ok @@ right ~loc (left ~loc delegate_opt) | Change_keys (threshold, keys) -> let optimized_keys = seq ~loc (List.map (optimized_key ~loc) keys) in let expr = right ~loc (pair ~loc (int ~loc threshold) optimized_keys) in - Error_monad.ok (right ~loc expr) + ok (right ~loc expr) let action_to_expr ~loc ~generic action = if generic then action_to_expr_generic ~loc action diff --git a/src/proto_011_PtHangz2/lib_client/managed_contract.ml b/src/proto_011_PtHangz2/lib_client/managed_contract.ml index cbc1db16a4eb..7e15c7482cc6 100644 --- a/src/proto_011_PtHangz2/lib_client/managed_contract.ml +++ b/src/proto_011_PtHangz2/lib_client/managed_contract.ml @@ -82,8 +82,7 @@ let parse code = Lwt.return ( Micheline_parser.no_parsing_error @@ Michelson_v1_parser.parse_expression code - >>? fun exp -> - Error_monad.ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) + >>? fun exp -> ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) let build_lambda_for_set_delegate ~delegate = match delegate with diff --git a/src/proto_011_PtHangz2/lib_delegate/client_baking_forge.ml b/src/proto_011_PtHangz2/lib_delegate/client_baking_forge.ml index 2b76caed5a52..7f85084c9571 100644 --- a/src/proto_011_PtHangz2/lib_delegate/client_baking_forge.ml +++ b/src/proto_011_PtHangz2/lib_delegate/client_baking_forge.ml @@ -1573,7 +1573,7 @@ let () = Block_vote_file_missing_liquidity_baking_escape_vote file_path) let traced_option_to_result ~error = - Option.fold ~some:ok ~none:(Error_monad.error error) + Option.fold ~some:ok ~none:(Tzresult_syntax.fail error) let check_file_exists file = if Sys.file_exists file then Result.return_unit diff --git a/src/proto_012_Psithaca/lib_benchmark/execution_context.ml b/src/proto_012_Psithaca/lib_benchmark/execution_context.ml index 74a60d5bd405..0093223692ef 100644 --- a/src/proto_012_Psithaca/lib_benchmark/execution_context.ml +++ b/src/proto_012_Psithaca/lib_benchmark/execution_context.ml @@ -24,7 +24,6 @@ (*****************************************************************************) open Protocol -open Error_monad type context = Alpha_context.context * Script_interpreter.step_constants diff --git a/src/proto_012_Psithaca/lib_benchmark/test/test_helpers.ml b/src/proto_012_Psithaca/lib_benchmark/test/test_helpers.ml index a27aed6768b6..8c6c9fdd6d66 100644 --- a/src/proto_012_Psithaca/lib_benchmark/test/test_helpers.ml +++ b/src/proto_012_Psithaca/lib_benchmark/test/test_helpers.ml @@ -23,8 +23,6 @@ (* *) (*****************************************************************************) -open Tezos_error_monad.Error_monad - let rng_state = Random.State.make [|42; 987897; 54120|] let print_script_expr fmtr (expr : Protocol.Script_repr.expr) = diff --git a/src/proto_012_Psithaca/lib_benchmarks_proto/translator_benchmarks.ml b/src/proto_012_Psithaca/lib_benchmarks_proto/translator_benchmarks.ml index e4a3da4cc86a..9c088f35233e 100644 --- a/src/proto_012_Psithaca/lib_benchmarks_proto/translator_benchmarks.ml +++ b/src/proto_012_Psithaca/lib_benchmarks_proto/translator_benchmarks.ml @@ -569,7 +569,6 @@ module Merge_types : Benchmark.S = struct [("size_translator_model", size_model); ("codegen", codegen_model)] let merge_type_benchmark rng_state nodes (ty : Script_ir_translator.ex_ty) = - let open Error_monad in Lwt_main.run ( Execution_context.make ~rng_state >>=? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in @@ -692,7 +691,6 @@ module Parse_type_benchmark : Benchmark.S = struct let info = "Benchmarking parse_ty" let make_bench rng_state config () = - let open Error_monad in ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in let size = Random.State.int rng_state config.max_size in @@ -744,7 +742,6 @@ module Unparse_type_benchmark : Benchmark.S = struct let info = "Benchmarking unparse_ty" let make_bench rng_state config () = - let open Error_monad in ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in let size = Random.State.int rng_state config.max_size in @@ -798,7 +795,6 @@ module Unparse_comparable_type_benchmark : Benchmark.S = struct let info = "Benchmarking unparse_comparable_ty" let make_bench rng_state config () = - let open Error_monad in let res = Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in diff --git a/src/proto_012_Psithaca/lib_client/client_proto_multisig.ml b/src/proto_012_Psithaca/lib_client/client_proto_multisig.ml index 4f55086fb152..09f1bbb5a15f 100644 --- a/src/proto_012_Psithaca/lib_client/client_proto_multisig.ml +++ b/src/proto_012_Psithaca/lib_client/client_proto_multisig.ml @@ -627,8 +627,7 @@ let action_to_expr_generic ~loc = function ~parameter ~amount >|? left ~loc) - | Lambda code -> - Error_monad.ok Tezos_micheline.Micheline.(left ~loc (root code)) + | Lambda code -> ok Tezos_micheline.Micheline.(left ~loc (root code)) | Change_delegate delegate -> lambda_from_string @@ Managed_contract.build_lambda_for_set_delegate ~delegate @@ -636,37 +635,36 @@ let action_to_expr_generic ~loc = function | Change_keys (threshold, keys) -> let optimized_keys = seq ~loc (List.map (optimized_key ~loc) keys) in let expr = right ~loc (pair ~loc (int ~loc threshold) optimized_keys) in - Error_monad.ok expr + ok expr let action_to_expr_legacy ~loc = function | Transfer {amount; destination; entrypoint; parameter_type; parameter} -> if parameter <> Tezos_micheline.Micheline.strip_locations (unit ~loc:()) - then Error_monad.error @@ Unsupported_feature_generic_call parameter + then error @@ Unsupported_feature_generic_call parameter else if parameter_type <> Tezos_micheline.Micheline.strip_locations (unit_t ~loc:()) - then - Error_monad.error @@ Unsupported_feature_generic_call_ty parameter_type + then error @@ Unsupported_feature_generic_call_ty parameter_type else - Error_monad.ok + ok @@ left ~loc (pair ~loc (mutez ~loc amount) (optimized_address ~loc ~address:destination ~entrypoint)) - | Lambda _ -> Error_monad.error @@ Unsupported_feature_lambda "" + | Lambda _ -> error @@ Unsupported_feature_lambda "" | Change_delegate delegate -> let delegate_opt = match delegate with | None -> none ~loc () | Some delegate -> some ~loc (optimized_key_hash ~loc delegate) in - Error_monad.ok @@ right ~loc (left ~loc delegate_opt) + ok @@ right ~loc (left ~loc delegate_opt) | Change_keys (threshold, keys) -> let optimized_keys = seq ~loc (List.map (optimized_key ~loc) keys) in let expr = right ~loc (pair ~loc (int ~loc threshold) optimized_keys) in - Error_monad.ok (right ~loc expr) + ok (right ~loc expr) let action_to_expr ~loc ~generic action = if generic then action_to_expr_generic ~loc action diff --git a/src/proto_012_Psithaca/lib_client/managed_contract.ml b/src/proto_012_Psithaca/lib_client/managed_contract.ml index cbc1db16a4eb..7e15c7482cc6 100644 --- a/src/proto_012_Psithaca/lib_client/managed_contract.ml +++ b/src/proto_012_Psithaca/lib_client/managed_contract.ml @@ -82,8 +82,7 @@ let parse code = Lwt.return ( Micheline_parser.no_parsing_error @@ Michelson_v1_parser.parse_expression code - >>? fun exp -> - Error_monad.ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) + >>? fun exp -> ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) let build_lambda_for_set_delegate ~delegate = match delegate with diff --git a/src/proto_012_Psithaca/lib_delegate/liquidity_baking_vote_file.ml b/src/proto_012_Psithaca/lib_delegate/liquidity_baking_vote_file.ml index 57bc0ce5a187..e0b051037b00 100644 --- a/src/proto_012_Psithaca/lib_delegate/liquidity_baking_vote_file.ml +++ b/src/proto_012_Psithaca/lib_delegate/liquidity_baking_vote_file.ml @@ -126,7 +126,7 @@ let () = Block_vote_file_missing_liquidity_baking_escape_vote file_path) let traced_option_to_result ~error = - Option.fold ~some:ok ~none:(Error_monad.error error) + Option.fold ~some:ok ~none:(Tzresult_syntax.fail error) let check_file_exists file = if Sys.file_exists file then Result.return_unit diff --git a/src/proto_alpha/lib_benchmark/execution_context.ml b/src/proto_alpha/lib_benchmark/execution_context.ml index 236e1c3b2128..404300f09730 100644 --- a/src/proto_alpha/lib_benchmark/execution_context.ml +++ b/src/proto_alpha/lib_benchmark/execution_context.ml @@ -24,7 +24,6 @@ (*****************************************************************************) open Protocol -open Error_monad type context = Alpha_context.context * Script_interpreter.step_constants diff --git a/src/proto_alpha/lib_benchmark/test/test_helpers.ml b/src/proto_alpha/lib_benchmark/test/test_helpers.ml index 0cfe43e5f1d8..189147add733 100644 --- a/src/proto_alpha/lib_benchmark/test/test_helpers.ml +++ b/src/proto_alpha/lib_benchmark/test/test_helpers.ml @@ -23,8 +23,6 @@ (* *) (*****************************************************************************) -open Tezos_error_monad.Error_monad - let rng_state = Random.State.make [|42; 987897; 54120|] let print_script_expr fmtr (expr : Protocol.Script_repr.expr) = diff --git a/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml b/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml index e24350e3e51b..5602b226ae4f 100644 --- a/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml +++ b/src/proto_alpha/lib_benchmarks_proto/translator_benchmarks.ml @@ -570,7 +570,6 @@ module Ty_eq : Benchmark.S = struct [("size_translator_model", size_model); ("codegen", codegen_model)] let ty_eq_benchmark rng_state nodes (ty : Script_ir_translator.ex_ty) = - let open Error_monad in Lwt_main.run ( Execution_context.make ~rng_state >>=? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in @@ -704,7 +703,6 @@ module Parse_type_benchmark : Benchmark.S = struct let info = "Benchmarking parse_ty" let make_bench rng_state config () = - let open Error_monad in ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in let size = Random.State.int rng_state config.max_size in @@ -756,7 +754,6 @@ module Unparse_type_benchmark : Benchmark.S = struct let info = "Benchmarking unparse_ty" let make_bench rng_state config () = - let open Error_monad in ( Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in let size = Random.State.int rng_state config.max_size in @@ -810,7 +807,6 @@ module Unparse_comparable_type_benchmark : Benchmark.S = struct let info = "Benchmarking unparse_comparable_ty" let make_bench rng_state config () = - let open Error_monad in let res = Lwt_main.run (Execution_context.make ~rng_state) >>? fun (ctxt, _) -> let ctxt = Gas_helpers.set_limit ctxt in diff --git a/src/proto_alpha/lib_client/client_proto_multisig.ml b/src/proto_alpha/lib_client/client_proto_multisig.ml index ce080f0bdf52..41a267cb4e5a 100644 --- a/src/proto_alpha/lib_client/client_proto_multisig.ml +++ b/src/proto_alpha/lib_client/client_proto_multisig.ml @@ -630,8 +630,7 @@ let action_to_expr_generic ~loc = function ~parameter ~amount >|? left ~loc) - | Lambda code -> - Error_monad.ok Tezos_micheline.Micheline.(left ~loc (root code)) + | Lambda code -> ok Tezos_micheline.Micheline.(left ~loc (root code)) | Change_delegate delegate -> lambda_from_string @@ Managed_contract.build_lambda_for_set_delegate ~delegate @@ -639,37 +638,36 @@ let action_to_expr_generic ~loc = function | Change_keys (threshold, keys) -> let optimized_keys = seq ~loc (List.map (optimized_key ~loc) keys) in let expr = right ~loc (pair ~loc (int ~loc threshold) optimized_keys) in - Error_monad.ok expr + ok expr let action_to_expr_legacy ~loc = function | Transfer {amount; destination; entrypoint; parameter_type; parameter} -> if parameter <> Tezos_micheline.Micheline.strip_locations (unit ~loc:()) - then Error_monad.error @@ Unsupported_feature_generic_call parameter + then error @@ Unsupported_feature_generic_call parameter else if parameter_type <> Tezos_micheline.Micheline.strip_locations (unit_t ~loc:()) - then - Error_monad.error @@ Unsupported_feature_generic_call_ty parameter_type + then error @@ Unsupported_feature_generic_call_ty parameter_type else - Error_monad.ok + ok @@ left ~loc (pair ~loc (mutez ~loc amount) (optimized_address ~loc ~address:destination ~entrypoint)) - | Lambda _ -> Error_monad.error @@ Unsupported_feature_lambda "" + | Lambda _ -> error @@ Unsupported_feature_lambda "" | Change_delegate delegate -> let delegate_opt = match delegate with | None -> none ~loc () | Some delegate -> some ~loc (optimized_key_hash ~loc delegate) in - Error_monad.ok @@ right ~loc (left ~loc delegate_opt) + ok @@ right ~loc (left ~loc delegate_opt) | Change_keys (threshold, keys) -> let optimized_keys = seq ~loc (List.map (optimized_key ~loc) keys) in let expr = right ~loc (pair ~loc (int ~loc threshold) optimized_keys) in - Error_monad.ok (right ~loc expr) + ok (right ~loc expr) let action_to_expr ~loc ~generic action = if generic then action_to_expr_generic ~loc action diff --git a/src/proto_alpha/lib_client/managed_contract.ml b/src/proto_alpha/lib_client/managed_contract.ml index 2bd7e30b06b9..7ed5db282c93 100644 --- a/src/proto_alpha/lib_client/managed_contract.ml +++ b/src/proto_alpha/lib_client/managed_contract.ml @@ -82,8 +82,7 @@ let parse code = Lwt.return ( Micheline_parser.no_parsing_error @@ Michelson_v1_parser.parse_expression code - >>? fun exp -> - Error_monad.ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) + >>? fun exp -> ok @@ Script.lazy_expr Michelson_v1_parser.(exp.expanded) ) let build_lambda_for_set_delegate ~delegate = match delegate with diff --git a/src/proto_alpha/lib_delegate/liquidity_baking_vote_file.ml b/src/proto_alpha/lib_delegate/liquidity_baking_vote_file.ml index b10ac7f41482..e23b2934b9e6 100644 --- a/src/proto_alpha/lib_delegate/liquidity_baking_vote_file.ml +++ b/src/proto_alpha/lib_delegate/liquidity_baking_vote_file.ml @@ -135,7 +135,7 @@ let () = Block_vote_file_missing_liquidity_baking_toggle_vote file_path) let traced_option_to_result ~error = - Option.fold ~some:ok ~none:(Error_monad.error error) + Option.fold ~some:ok ~none:(Tzresult_syntax.fail error) let check_file_exists file = if Sys.file_exists file then Result.return_unit diff --git a/src/proto_alpha/lib_plugin/plugin.ml b/src/proto_alpha/lib_plugin/plugin.ml index 3a861b016358..8bd6c0d76461 100644 --- a/src/proto_alpha/lib_plugin/plugin.ml +++ b/src/proto_alpha/lib_plugin/plugin.ml @@ -2413,7 +2413,7 @@ module RPC = struct Contract.get_script ctxt contract >>=? fun (ctxt, script_opt) -> Option.fold ~some:ok - ~none:(Error_monad.error View_helpers.Viewed_contract_has_no_script) + ~none:(error View_helpers.Viewed_contract_has_no_script) script_opt >>?= fun script -> Script_repr.(force_decode script.code) >>?= fun decoded_script -> -- GitLab From 271158e8e38a01ce71bea1a1b1ce6df0f318752e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Wed, 23 Mar 2022 08:35:47 +0100 Subject: [PATCH 5/5] Everywhere: remove last remnants of infix binders and other globals - Replace global infix binders (`>>=`, `>>?`, `>>=?`, etc.) by local binding operators (`let*` etc. from `*_syntax`). - Replace global returns and fails (`return`, `ok`, `fail`, `error`) by local return and fails (`return` and `fail` from `*_syntax`). --- docs/doc_gen/rpc_doc.ml | 2 +- scripts/yes-wallet/yes_wallet_lib.ml | 10 +++--- src/bin_codec/codec.ml | 2 +- src/bin_codec/commands.ml | 4 +-- src/bin_node/node_data_version.ml | 1 + src/bin_tps_evaluation/gas_tps_command.ml | 32 ++++++++++--------- src/bin_validation/validator.ml | 2 +- .../client_keys_commands.ml | 5 +-- src/lib_context/context.ml | 24 ++++++++------ .../test/test_mem_context.ml | 14 ++++---- src/lib_store/cemented_block_store.ml | 7 ++-- src/lib_store/test/alpha_utils.ml | 26 +++++++++------ 12 files changed, 73 insertions(+), 56 deletions(-) diff --git a/docs/doc_gen/rpc_doc.ml b/docs/doc_gen/rpc_doc.ml index e64891ff89ff..69fc4fb357bf 100644 --- a/docs/doc_gen/rpc_doc.ml +++ b/docs/doc_gen/rpc_doc.ml @@ -429,7 +429,7 @@ let make_default_acl _node = |> Data_encoding.Json.construct policy_encoding in Data_encoding.Json.pp Format.std_formatter policy ; - return () + Lwt.return_ok () let main node = let cmd = Sys.argv.(1) in diff --git a/scripts/yes-wallet/yes_wallet_lib.ml b/scripts/yes-wallet/yes_wallet_lib.ml index e1fdceccecb1..704b56e6a3a9 100644 --- a/scripts/yes-wallet/yes_wallet_lib.ml +++ b/scripts/yes-wallet/yes_wallet_lib.ml @@ -183,7 +183,7 @@ let get_delegates (proto : protocol) context Lwt.return @@ Environment.wrap_tzresult r in let* delegates = - Alpha_context.Delegate.fold ctxt ~init:(ok []) ~f:(fun pkh acc -> + Alpha_context.Delegate.fold ctxt ~init:(Ok []) ~f:(fun pkh acc -> let* pk = let*! r = Alpha_context.Roll.delegate_pubkey ctxt pkh in Lwt.return @@ Environment.wrap_tzresult r @@ -224,7 +224,7 @@ let get_delegates (proto : protocol) context Lwt.return @@ Environment.wrap_tzresult r in let* delegates = - Alpha_context.Delegate.fold ctxt ~init:(ok []) ~f:(fun pkh acc -> + Alpha_context.Delegate.fold ctxt ~init:(Ok []) ~f:(fun pkh acc -> let* pk = let*! r = Alpha_context.Roll.delegate_pubkey ctxt pkh in Lwt.return @@ Environment.wrap_tzresult r @@ -265,7 +265,7 @@ let get_delegates (proto : protocol) context Lwt.return @@ Environment.wrap_tzresult r in let* delegates = - Alpha_context.Delegate.fold ctxt ~init:(ok []) ~f:(fun pkh acc -> + Alpha_context.Delegate.fold ctxt ~init:(Ok []) ~f:(fun pkh acc -> let* pk = let*! r = Alpha_context.Roll.delegate_pubkey ctxt pkh in Lwt.return @@ Environment.wrap_tzresult r @@ -304,7 +304,7 @@ let get_delegates (proto : protocol) context Alpha_context.Delegate.fold ctxt ~order:`Sorted - ~init:(ok []) + ~init:(Ok []) ~f:(fun pkh acc -> let* pk = let*! r = Alpha_context.Delegate.pubkey ctxt pkh in @@ -344,7 +344,7 @@ let get_delegates (proto : protocol) context Alpha_context.Delegate.fold ctxt ~order:`Sorted - ~init:(ok []) + ~init:(Ok []) ~f:(fun pkh acc -> let* pk = let*! r = Alpha_context.Delegate.pubkey ctxt pkh in diff --git a/src/bin_codec/codec.ml b/src/bin_codec/codec.ml index 6a5dd75d4aa3..40721ee9ede1 100644 --- a/src/bin_codec/codec.ml +++ b/src/bin_codec/codec.ml @@ -41,7 +41,7 @@ let base_dir_arg = ("data directory\n\ The directory where the Tezos codec will output logs.\n\ By default: '" ^ default_base_dir ^ "'.") - (parameter (fun _ctxt x -> return x)) + (parameter (fun _ctxt x -> Lwt.return_ok x)) let global_options = Clic.args1 base_dir_arg diff --git a/src/bin_codec/commands.ml b/src/bin_codec/commands.ml index bef6d9a14c9c..28972c20271d 100644 --- a/src/bin_codec/commands.ml +++ b/src/bin_codec/commands.ml @@ -30,7 +30,7 @@ let group = {name = "encoding"; title = "Commands to handle encodings"} let id_parameter = parameter (fun (cctxt : #Client_context.printer) id -> match Data_encoding.Registration.find id with - | Some record -> return record + | Some record -> Lwt.return_ok record | None -> cctxt#error "Unknown encoding id: %s" id) let json_parameter = @@ -49,7 +49,7 @@ let json_parameter = let bytes_parameter = parameter (fun (cctxt : #Client_context.printer) hex -> match Hex.to_bytes (`Hex hex) with - | Some s -> return s + | Some s -> Lwt.return_ok s | None -> cctxt#error "Invalid hex string: %s" hex) let commands () = diff --git a/src/bin_node/node_data_version.ml b/src/bin_node/node_data_version.ml index 82cec35a9cbe..809a9ced522e 100644 --- a/src/bin_node/node_data_version.ml +++ b/src/bin_node/node_data_version.ml @@ -61,6 +61,7 @@ let data_version = "0.0.8" converter), and to sequence them dynamically instead of statically. *) let upgradable_data_version = + let open Lwt_tzresult_syntax in [ ( "0.0.6", fun ~data_dir:_ _ ~chain_name:_ ~sandbox_parameters:_ -> return_unit ); diff --git a/src/bin_tps_evaluation/gas_tps_command.ml b/src/bin_tps_evaluation/gas_tps_command.ml index f337e5b01842..30f6a5860b1b 100644 --- a/src/bin_tps_evaluation/gas_tps_command.ml +++ b/src/bin_tps_evaluation/gas_tps_command.ml @@ -34,22 +34,24 @@ type gas_estimation_results = { let estimate_gas_tps ~average_block_path () = Log.info "Gas TPS estimation" ; - Protocol.write_parameter_file - ~base:(Either.right (protocol, Some protocol_constants)) - [] - >>= fun parameter_file -> - Client.init_with_protocol - ~nodes_args:Node.[Connections 0; Synchronisation_threshold 0] - ~parameter_file - ~timestamp_delay:0.0 - `Client - ~protocol - () - >>= fun (node, client) -> - Average_block.load average_block_path >>= fun average_block -> - Average_block.check_for_unknown_smart_contracts average_block >>= fun () -> + let* parameter_file = + Protocol.write_parameter_file + ~base:(Either.right (protocol, Some protocol_constants)) + [] + in + let* (node, client) = + Client.init_with_protocol + ~nodes_args:Node.[Connections 0; Synchronisation_threshold 0] + ~parameter_file + ~timestamp_delay:0.0 + `Client + ~protocol + () + in + let* average_block = Average_block.load average_block_path in + let* () = Average_block.check_for_unknown_smart_contracts average_block in let delegates = make_delegates Constants.default_bootstraps_count in - Baker.init ~protocol ~delegates node client >>= fun baker -> + let* baker = Baker.init ~protocol ~delegates node client in Log.info "Originating smart contracts" ; let* () = Client.stresstest_originate_smart_contracts originating_bootstrap client diff --git a/src/bin_validation/validator.ml b/src/bin_validation/validator.ml index 5eabe939e108..9227d0a7efd2 100644 --- a/src/bin_validation/validator.ml +++ b/src/bin_validation/validator.ml @@ -295,7 +295,7 @@ let run input output = (err, None) | Error _ as err -> (err, cache) | Ok {result; cache} -> - ( ok result, + ( Ok result, Some {context_hash = block_header.shell.context; cache} ) in let*! () = diff --git a/src/lib_client_commands/client_keys_commands.ml b/src/lib_client_commands/client_keys_commands.ml index 91e39842cd8f..911e4268ed0e 100644 --- a/src/lib_client_commands/client_keys_commands.ml +++ b/src/lib_client_commands/client_keys_commands.ml @@ -243,6 +243,7 @@ let keys_count_param = ~name:"keys_count" ~desc:"How many keys to generate" (parameter (fun _ s -> + let open Lwt_tzresult_syntax in match int_of_string_opt s with | None -> failwith "number of keys must be an integer" | Some x -> @@ -287,8 +288,8 @@ let generate_test_keys = let (pkh, pk, sk) = Signature.generate_key ~algo:Signature.Ed25519 () in - Tezos_signer_backends.Unencrypted.make_pk pk >>?= fun pk_uri -> - Tezos_signer_backends.Unencrypted.make_sk sk >>?= fun sk_uri -> + let*? pk_uri = Tezos_signer_backends.Unencrypted.make_pk pk in + let*? sk_uri = Tezos_signer_backends.Unencrypted.make_sk sk in return ({pkh; pk; sk}, pk_uri, sk_uri, alias)) in let* () = diff --git a/src/lib_context/context.ml b/src/lib_context/context.ml index a7f8495a3b4c..8f0aa599f08c 100644 --- a/src/lib_context/context.ml +++ b/src/lib_context/context.ml @@ -576,18 +576,20 @@ module Make (Encoding : module type of Tezos_context_encoding.Context) = struct Tree.add t current_test_chain_key id let find_predecessor_block_metadata_hash t = - Tree.find t current_predecessor_block_metadata_hash_key >>= function - | None -> Lwt.return_none + let open Lwt_syntax in + let* o = Tree.find t current_predecessor_block_metadata_hash_key in + match o with + | None -> return_none | Some data -> ( match Data_encoding.Binary.of_bytes_opt Block_metadata_hash.encoding data with | None -> - Lwt.fail + raise (Failure "Unexpected error \ (Context.get_predecessor_block_metadata_hash)") - | Some r -> Lwt.return_some r) + | Some r -> return_some r) let add_predecessor_block_metadata_hash t hash = let data = @@ -596,8 +598,10 @@ module Make (Encoding : module type of Tezos_context_encoding.Context) = struct Tree.add t current_predecessor_block_metadata_hash_key data let find_predecessor_ops_metadata_hash t = - Tree.find t current_predecessor_ops_metadata_hash_key >>= function - | None -> Lwt.return_none + let open Lwt_syntax in + let* o = Tree.find t current_predecessor_ops_metadata_hash_key in + match o with + | None -> return_none | Some data -> ( match Data_encoding.Binary.of_bytes_opt @@ -605,11 +609,11 @@ module Make (Encoding : module type of Tezos_context_encoding.Context) = struct data with | None -> - Lwt.fail + raise (Failure "Unexpected error \ (Context.get_predecessor_ops_metadata_hash)") - | Some r -> Lwt.return_some r) + | Some r -> return_some r) let add_predecessor_ops_metadata_hash t hash = let data = @@ -631,7 +635,9 @@ module Make (Encoding : module type of Tezos_context_encoding.Context) = struct Root_tree.find_predecessor_ops_metadata_hash ctxt.tree let lift_tree_add_to_ctxt tree_add ctxt v = - tree_add ctxt.tree v >|= fun tree -> incr_ops {ctxt with tree} + let open Lwt_syntax in + let+ tree = tree_add ctxt.tree v in + incr_ops {ctxt with tree} let add_protocol = lift_tree_add_to_ctxt Root_tree.add_protocol diff --git a/src/lib_protocol_environment/test/test_mem_context.ml b/src/lib_protocol_environment/test/test_mem_context.ml index 4e167c7380f8..8feea9bcc20e 100644 --- a/src/lib_protocol_environment/test/test_mem_context.ml +++ b/src/lib_protocol_environment/test/test_mem_context.ml @@ -94,21 +94,21 @@ let test_simple {block2 = ctxt; _} = Assert.equal_string_option ~msg:__LOC__ (Some "Juin") (c juin) ; (* Mem function returns "true" if the key given leads to an existing leaf *) - Context.mem ctxt ["a"] >>= fun res -> + let* res = Context.mem ctxt ["a"] in Assert.equal_bool false res ; - Context.mem ctxt ["a"; "c"] >>= fun res -> + let* res = Context.mem ctxt ["a"; "c"] in Assert.equal_bool true res ; - Context.mem ctxt ["a"; "x"] >>= fun res -> + let* res = Context.mem ctxt ["a"; "x"] in Assert.equal_bool false res ; (* Mem_tree is like "mem", but also returns "true" for a trunk node *) - Context.mem_tree ctxt ["a"] >>= fun res -> + let* res = Context.mem_tree ctxt ["a"] in Assert.equal_bool true res ; - Context.mem_tree ctxt ["a"; "c"] >>= fun res -> + let* res = Context.mem_tree ctxt ["a"; "c"] in Assert.equal_bool true res ; - Context.mem_tree ctxt ["a"; "x"] >>= fun res -> + let* res = Context.mem_tree ctxt ["a"; "x"] in Assert.equal_bool false res ; - Lwt.return_unit + return_unit (** Restore the context applied until [block3a]. It is asserted that the following key-values are present: diff --git a/src/lib_store/cemented_block_store.ml b/src/lib_store/cemented_block_store.ml index 374fc282c2c4..bc39d7e304aa 100644 --- a/src/lib_store/cemented_block_store.ml +++ b/src/lib_store/cemented_block_store.ml @@ -668,7 +668,7 @@ let cement_blocks ?(check_consistency = true) (cemented_store : t) cemented_store.cemented_blocks_files <- Some new_array ; (* Compress and write the metadatas *) if write_metadata then - Store_events.(emit start_cementing_blocks_metadata) () >>= fun () -> + let*! () = Store_events.(emit start_cementing_blocks_metadata) () in cement_blocks_metadata cemented_store blocks else return_unit @@ -728,9 +728,10 @@ let trigger_rolling_gc cemented_store cemented_blocks_files offset = files_to_remove let trigger_gc cemented_store history_mode = - Store_events.(emit start_store_garbage_collection) () >>= fun () -> + let open Lwt_syntax in + let* () = Store_events.(emit start_store_garbage_collection) () in match cemented_store.cemented_blocks_files with - | None -> Lwt.return_unit + | None -> return_unit | Some cemented_blocks_files -> ( match history_mode with | History_mode.Archive -> Lwt.return_unit diff --git a/src/lib_store/test/alpha_utils.ml b/src/lib_store/test/alpha_utils.ml index 5109e76ef987..c455f6f2d430 100644 --- a/src/lib_store/test/alpha_utils.ml +++ b/src/lib_store/test/alpha_utils.ml @@ -149,7 +149,7 @@ let make_rpc_context ~chain_id ctxt block = {shell = header; protocol_data = Store.Block.protocol_data block} in let ctxt = Shell_context.wrap_disk_context ctxt in - let* value_of_key = + let*! value_of_key = Main.value_of_key ~chain_id ~predecessor_context:ctxt @@ -158,16 +158,22 @@ let make_rpc_context ~chain_id ctxt block = ~predecessor_fitness ~predecessor ~timestamp - >|= Tezos_protocol_alpha.Protocol.Environment.wrap_tzresult in - Tezos_protocol_environment.Context.load_cache - (Store.Block.hash block) - ctxt - `Lazy - (fun key -> - value_of_key key - >|= Tezos_protocol_alpha.Protocol.Environment.wrap_tzresult) - >>=? fun ctxt -> + let*? value_of_key = + Tezos_protocol_alpha.Protocol.Environment.wrap_tzresult value_of_key + in + let* ctxt = + Tezos_protocol_environment.Context.load_cache + (Store.Block.hash block) + ctxt + `Lazy + (fun key -> + let*! value = value_of_key key in + let*? value = + Tezos_protocol_alpha.Protocol.Environment.wrap_tzresult value + in + return value) + in return @@ new Environment.proto_rpc_context_of_directory (fun block -> -- GitLab