From 92d166175fce64df095fdb9c81c0d1ddb43b22f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Mon, 27 Nov 2017 06:13:12 +0100 Subject: [PATCH] Jbuilder: move Micheline in its own OPAM package --- {src/micheline => lib_micheline}/jbuild | 7 +++---- {src/micheline => lib_micheline}/micheline.ml | 0 .../micheline => lib_micheline}/micheline.mli | 0 .../micheline_parser.ml | 0 .../micheline_parser.mli | 0 .../micheline_printer.ml | 0 .../micheline_printer.mli | 0 lib_micheline/tezos-micheline.opam | 21 +++++++++++++++++++ .../embedded/alpha/client_proto_context.ml | 1 + .../embedded/alpha/client_proto_programs.ml | 1 + .../embedded/alpha/client_proto_programs.mli | 2 ++ src/client/embedded/alpha/michelson_macros.ml | 1 + .../embedded/alpha/michelson_macros.mli | 2 ++ .../embedded/alpha/michelson_v1_emacs.ml | 1 + .../alpha/michelson_v1_error_reporter.ml | 1 + .../embedded/alpha/michelson_v1_parser.ml | 1 + .../embedded/alpha/michelson_v1_parser.mli | 2 ++ .../embedded/alpha/michelson_v1_printer.ml | 1 + .../embedded/alpha/michelson_v1_printer.mli | 2 ++ .../embedded/alpha/script_located_ir.ml | 2 ++ src/node/updater/jbuild | 2 +- .../updater/tezos_protocol_environment.ml | 2 +- 22 files changed, 43 insertions(+), 6 deletions(-) rename {src/micheline => lib_micheline}/jbuild (72%) rename {src/micheline => lib_micheline}/micheline.ml (100%) rename {src/micheline => lib_micheline}/micheline.mli (100%) rename {src/micheline => lib_micheline}/micheline_parser.ml (100%) rename {src/micheline => lib_micheline}/micheline_parser.mli (100%) rename {src/micheline => lib_micheline}/micheline_printer.ml (100%) rename {src/micheline => lib_micheline}/micheline_printer.mli (100%) create mode 100644 lib_micheline/tezos-micheline.opam diff --git a/src/micheline/jbuild b/lib_micheline/jbuild similarity index 72% rename from src/micheline/jbuild rename to lib_micheline/jbuild index 28c0fe80d..f1b7d16f7 100644 --- a/src/micheline/jbuild +++ b/lib_micheline/jbuild @@ -1,8 +1,8 @@ (jbuild_version 1) (library - ((name micheline) - (public_name tezos.micheline) + ((name tezos_micheline) + (public_name tezos-micheline) (libraries ( ;; External @@ -12,8 +12,7 @@ )) (flags (:standard -w -9+27-30-32-40@8 -safe-string - -open Tezos_base__TzPervasives)) - (wrapped false))) + -open Tezos_base__TzPervasives)))) (alias ((name runtest_indent) diff --git a/src/micheline/micheline.ml b/lib_micheline/micheline.ml similarity index 100% rename from src/micheline/micheline.ml rename to lib_micheline/micheline.ml diff --git a/src/micheline/micheline.mli b/lib_micheline/micheline.mli similarity index 100% rename from src/micheline/micheline.mli rename to lib_micheline/micheline.mli diff --git a/src/micheline/micheline_parser.ml b/lib_micheline/micheline_parser.ml similarity index 100% rename from src/micheline/micheline_parser.ml rename to lib_micheline/micheline_parser.ml diff --git a/src/micheline/micheline_parser.mli b/lib_micheline/micheline_parser.mli similarity index 100% rename from src/micheline/micheline_parser.mli rename to lib_micheline/micheline_parser.mli diff --git a/src/micheline/micheline_printer.ml b/lib_micheline/micheline_printer.ml similarity index 100% rename from src/micheline/micheline_printer.ml rename to lib_micheline/micheline_printer.ml diff --git a/src/micheline/micheline_printer.mli b/lib_micheline/micheline_printer.mli similarity index 100% rename from src/micheline/micheline_printer.mli rename to lib_micheline/micheline_printer.mli diff --git a/lib_micheline/tezos-micheline.opam b/lib_micheline/tezos-micheline.opam new file mode 100644 index 000000000..b844cddf0 --- /dev/null +++ b/lib_micheline/tezos-micheline.opam @@ -0,0 +1,21 @@ +opam-version: "1.2" +version: "dev" +maintainer: "contact@tezos.com" +authors: [ "Tezos devteam" ] +homepage: "https://www.tezos.com/" +bug-reports: "https://gitlab.com/tezos/tezos/issues" +dev-repo: "https://gitlab.com/tezos/tezos.git" +license: "unreleased" +depends: [ + "ocamlfind" { build } + "jbuilder" { build & >= "1.0+beta15" } + "base-bigarray" + "tezos-base" + "uutf" +] +build: [ + [ "jbuilder" "build" "-p" name "-j" jobs ] +] +build-test: [ + [ "jbuilder" "runtest" "-p" name "-j" jobs ] +] diff --git a/src/client/embedded/alpha/client_proto_context.ml b/src/client/embedded/alpha/client_proto_context.ml index c2e261c1e..a19377cb0 100644 --- a/src/client/embedded/alpha/client_proto_context.ml +++ b/src/client/embedded/alpha/client_proto_context.ml @@ -7,6 +7,7 @@ (* *) (**************************************************************************) +open Tezos_micheline open Client_proto_args open Client_proto_contracts open Client_proto_programs diff --git a/src/client/embedded/alpha/client_proto_programs.ml b/src/client/embedded/alpha/client_proto_programs.ml index cb7aaaef8..120ce6bd1 100644 --- a/src/client/embedded/alpha/client_proto_programs.ml +++ b/src/client/embedded/alpha/client_proto_programs.ml @@ -7,6 +7,7 @@ (* *) (**************************************************************************) +open Tezos_micheline open Client_proto_args open Michelson_v1_printer diff --git a/src/client/embedded/alpha/client_proto_programs.mli b/src/client/embedded/alpha/client_proto_programs.mli index d7ccc1b06..137e141b3 100644 --- a/src/client/embedded/alpha/client_proto_programs.mli +++ b/src/client/embedded/alpha/client_proto_programs.mli @@ -7,6 +7,8 @@ (* *) (**************************************************************************) +open Tezos_micheline + module Program : Client_aliases.Alias with type t = Michelson_v1_parser.parsed Micheline_parser.parsing_result diff --git a/src/client/embedded/alpha/michelson_macros.ml b/src/client/embedded/alpha/michelson_macros.ml index 3d4a1c3cf..6ef996a73 100644 --- a/src/client/embedded/alpha/michelson_macros.ml +++ b/src/client/embedded/alpha/michelson_macros.ml @@ -7,6 +7,7 @@ (* *) (**************************************************************************) +open Tezos_micheline open Micheline type 'l node = ('l, string) Micheline.node diff --git a/src/client/embedded/alpha/michelson_macros.mli b/src/client/embedded/alpha/michelson_macros.mli index a673c855c..a5cdde6a7 100644 --- a/src/client/embedded/alpha/michelson_macros.mli +++ b/src/client/embedded/alpha/michelson_macros.mli @@ -7,6 +7,8 @@ (* *) (**************************************************************************) +open Tezos_micheline + type 'l node = ('l, string) Micheline.node val expand : 'l node -> 'l node diff --git a/src/client/embedded/alpha/michelson_v1_emacs.ml b/src/client/embedded/alpha/michelson_v1_emacs.ml index fd9327695..4a4b943a0 100644 --- a/src/client/embedded/alpha/michelson_v1_emacs.ml +++ b/src/client/embedded/alpha/michelson_v1_emacs.ml @@ -7,6 +7,7 @@ (* *) (**************************************************************************) +open Tezos_micheline open Micheline let print_expr ppf expr = diff --git a/src/client/embedded/alpha/michelson_v1_error_reporter.ml b/src/client/embedded/alpha/michelson_v1_error_reporter.ml index 9910ffc79..e265965df 100644 --- a/src/client/embedded/alpha/michelson_v1_error_reporter.ml +++ b/src/client/embedded/alpha/michelson_v1_error_reporter.ml @@ -7,6 +7,7 @@ (* *) (**************************************************************************) +open Tezos_micheline open Script_typed_ir open Script_ir_translator open Script_interpreter diff --git a/src/client/embedded/alpha/michelson_v1_parser.ml b/src/client/embedded/alpha/michelson_v1_parser.ml index 93fb5923b..41cb01dfb 100644 --- a/src/client/embedded/alpha/michelson_v1_parser.ml +++ b/src/client/embedded/alpha/michelson_v1_parser.ml @@ -7,6 +7,7 @@ (* *) (**************************************************************************) +open Tezos_micheline open Micheline_parser open Micheline diff --git a/src/client/embedded/alpha/michelson_v1_parser.mli b/src/client/embedded/alpha/michelson_v1_parser.mli index c7f0d0876..1aa5dbacc 100644 --- a/src/client/embedded/alpha/michelson_v1_parser.mli +++ b/src/client/embedded/alpha/michelson_v1_parser.mli @@ -7,6 +7,8 @@ (* *) (**************************************************************************) +open Tezos_micheline + (** The result of parsing and expanding a Michelson V1 script or data. *) type parsed = { diff --git a/src/client/embedded/alpha/michelson_v1_printer.ml b/src/client/embedded/alpha/michelson_v1_printer.ml index 53523679e..9ac3fee68 100644 --- a/src/client/embedded/alpha/michelson_v1_printer.ml +++ b/src/client/embedded/alpha/michelson_v1_printer.ml @@ -7,6 +7,7 @@ (* *) (**************************************************************************) +open Tezos_micheline open Micheline open Micheline_printer diff --git a/src/client/embedded/alpha/michelson_v1_printer.mli b/src/client/embedded/alpha/michelson_v1_printer.mli index 6352c54ca..f1bbbdeef 100644 --- a/src/client/embedded/alpha/michelson_v1_printer.mli +++ b/src/client/embedded/alpha/michelson_v1_printer.mli @@ -7,6 +7,8 @@ (* *) (**************************************************************************) +open Tezos_micheline + val print_expr : Format.formatter -> Script_repr.expr -> unit diff --git a/src/client/embedded/alpha/script_located_ir.ml b/src/client/embedded/alpha/script_located_ir.ml index 893a84b40..931accf73 100644 --- a/src/client/embedded/alpha/script_located_ir.ml +++ b/src/client/embedded/alpha/script_located_ir.ml @@ -7,6 +7,8 @@ (* *) (**************************************************************************) +open Tezos_micheline + type point = Micheline_parser.point = { point : int ; byte : int ; diff --git a/src/node/updater/jbuild b/src/node/updater/jbuild index 2e69bc396..14ad22efd 100644 --- a/src/node/updater/jbuild +++ b/src/node/updater/jbuild @@ -4,7 +4,7 @@ ((name node_updater) (public_name tezos.node.updater) (libraries (tezos-base - micheline + tezos-micheline tezos_protocol_compiler node_net node_db diff --git a/src/node/updater/tezos_protocol_environment.ml b/src/node/updater/tezos_protocol_environment.ml index 0d11b1126..d764974da 100644 --- a/src/node/updater/tezos_protocol_environment.ml +++ b/src/node/updater/tezos_protocol_environment.ml @@ -57,7 +57,7 @@ module Make(Param : sig val name: string end)() = struct module Protocol = Protocol end module RPC = RPC - module Micheline = Micheline + module Micheline = Tezos_micheline.Micheline module Fitness = Fitness module Error_monad = struct type error_category = [ `Branch | `Temporary | `Permanent ]