From ca29c92442a48cb70f4c91046b0e9cceda5ded20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Tue, 30 Jan 2018 11:45:38 +0100 Subject: [PATCH] Refactor: move `tezos-micheline` below `tezos-base` --- src/lib_base/jbuild | 2 ++ src/lib_base/protocol_environment.ml | 1 + src/lib_base/tezos-base.opam | 2 ++ src/lib_base/tzPervasives.ml | 1 + src/lib_client_environment/environment.ml | 1 - src/lib_micheline/jbuild | 6 ++++-- src/lib_micheline/micheline_parser.ml | 1 + src/lib_micheline/tezos-micheline.opam | 3 ++- src/lib_protocol_updater/tezos_protocol_environment.ml | 1 - 9 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/lib_base/jbuild b/src/lib_base/jbuild index 49a4a0340..2a166a9a0 100644 --- a/src/lib_base/jbuild +++ b/src/lib_base/jbuild @@ -9,6 +9,7 @@ -open Tezos_data_encoding -open Tezos_error_monad -open Tezos_rpc + -open Tezos_micheline -safe-string)) (libraries (tezos-stdlib tezos-stdlib-lwt @@ -16,6 +17,7 @@ tezos-data-encoding tezos-error-monad tezos-rpc + tezos-micheline calendar ezjsonm mtime.clock.os)))) diff --git a/src/lib_base/protocol_environment.ml b/src/lib_base/protocol_environment.ml index 1e8cdf459..dd5789507 100644 --- a/src/lib_base/protocol_environment.ml +++ b/src/lib_base/protocol_environment.ml @@ -67,6 +67,7 @@ module Make(Param : sig val name: string end)() = struct type error_category = [ `Branch | `Temporary | `Permanent ] include Error_monad.Make() end + module Micheline = Micheline module Logging = Logging.Make(Param) type error += Ecoproto_error of Error_monad.error list diff --git a/src/lib_base/tezos-base.opam b/src/lib_base/tezos-base.opam index 36283ce7a..f1869338c 100644 --- a/src/lib_base/tezos-base.opam +++ b/src/lib_base/tezos-base.opam @@ -14,6 +14,8 @@ depends: [ "tezos-crypto" "tezos-data-encoding" "tezos-error-monad" + "tezos-micheline" + "tezos-rpc" "ezjsonm" { >= "0.5.0" } "calendar" "mtime" { >= "1.0.0" } diff --git a/src/lib_base/tzPervasives.ml b/src/lib_base/tzPervasives.ml index dd5469a2d..a5ca5655f 100644 --- a/src/lib_base/tzPervasives.ml +++ b/src/lib_base/tzPervasives.ml @@ -13,6 +13,7 @@ include Tezos_data_encoding include Tezos_error_monad include Tezos_rpc include Tezos_crypto +include Tezos_micheline module List = struct include List diff --git a/src/lib_client_environment/environment.ml b/src/lib_client_environment/environment.ml index 3279ef8bf..2c49555f7 100644 --- a/src/lib_client_environment/environment.ml +++ b/src/lib_client_environment/environment.ml @@ -11,7 +11,6 @@ module Make(Param : sig val name: string end)() = struct include Tezos_base.Protocol_environment.Make(Param)() - module Micheline = Micheline module Updater = struct include Fake_updater.Make(Fake_context) module type PROTOCOL = diff --git a/src/lib_micheline/jbuild b/src/lib_micheline/jbuild index 3b00b3da7..a5fafae89 100644 --- a/src/lib_micheline/jbuild +++ b/src/lib_micheline/jbuild @@ -8,11 +8,13 @@ ;; External uutf ;; Internal - tezos-base + tezos-error-monad + tezos-data-encoding )) (flags (:standard -w -9+27-30-32-40@8 -safe-string - -open Tezos_base__TzPervasives)))) + -open Tezos_error_monad + -open Tezos_data_encoding)))) (alias ((name runtest_indent) diff --git a/src/lib_micheline/micheline_parser.ml b/src/lib_micheline/micheline_parser.ml index dfaa29b85..7fe58cacf 100644 --- a/src/lib_micheline/micheline_parser.ml +++ b/src/lib_micheline/micheline_parser.ml @@ -7,6 +7,7 @@ (* *) (**************************************************************************) +open Error_monad open Micheline type 'a parsing_result = 'a * error list diff --git a/src/lib_micheline/tezos-micheline.opam b/src/lib_micheline/tezos-micheline.opam index a0a1c65de..fabcc2047 100644 --- a/src/lib_micheline/tezos-micheline.opam +++ b/src/lib_micheline/tezos-micheline.opam @@ -9,7 +9,8 @@ license: "unreleased" depends: [ "ocamlfind" { build } "jbuilder" { build & >= "1.0+beta15" } - "tezos-base" + "tezos-data-encoding" + "tezos-error-monad" "uutf" ] build: [ diff --git a/src/lib_protocol_updater/tezos_protocol_environment.ml b/src/lib_protocol_updater/tezos_protocol_environment.ml index 68066766a..58de9b40f 100644 --- a/src/lib_protocol_updater/tezos_protocol_environment.ml +++ b/src/lib_protocol_updater/tezos_protocol_environment.ml @@ -11,7 +11,6 @@ module Make(Param : sig val name: string end)() = struct include Tezos_base.Protocol_environment.Make(Param)() - module Micheline = Micheline module Updater = struct include Updater module type PROTOCOL =