From 70a4fbac3a18ebad62e4b90c1bd937d0aa78fbb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Mon, 29 Jan 2018 01:16:58 +0100 Subject: [PATCH] Refactor: rename package `tezos-embedded-client-*` -> `tezos-client-*` --- src/bin_client/jbuild | 4 ++-- src/bin_client/tezos-client.opam | 4 ++-- .../jbuild_embedded_protocol_template | 4 ++-- src/lib_protocol_compiler/jbuild_protocol_template | 6 +++--- src/proto_alpha/lib_client/jbuild | 4 ++-- ...embedded-client-alpha.opam => tezos-client-alpha.opam} | 0 src/proto_genesis/lib_client/client_proto_main.ml | 2 +- src/proto_genesis/lib_client/jbuild | 6 +++--- ...dded-client-genesis.opam => tezos-client-genesis.opam} | 4 ++-- test/proto_alpha/jbuild | 8 ++++---- test/proto_alpha/proto_alpha_helpers.ml | 2 +- 11 files changed, 22 insertions(+), 22 deletions(-) rename src/proto_alpha/lib_client/{tezos-embedded-client-alpha.opam => tezos-client-alpha.opam} (100%) rename src/proto_genesis/lib_client/{tezos-embedded-client-genesis.opam => tezos-client-genesis.opam} (95%) diff --git a/src/bin_client/jbuild b/src/bin_client/jbuild index f4222063d..789e5425a 100644 --- a/src/bin_client/jbuild +++ b/src/bin_client/jbuild @@ -6,8 +6,8 @@ (libraries (tezos-base tezos-rpc-http tezos-client-base - tezos-embedded-client-genesis - tezos-embedded-client-alpha)) + tezos-client-genesis + tezos-client-alpha)) (flags (:standard -w -9+27-30-32-40@8 -safe-string -open Tezos_base__TzPervasives diff --git a/src/bin_client/tezos-client.opam b/src/bin_client/tezos-client.opam index 21eff4929..6bdc013b9 100644 --- a/src/bin_client/tezos-client.opam +++ b/src/bin_client/tezos-client.opam @@ -10,9 +10,9 @@ depends: [ "ocamlfind" { build } "jbuilder" { build & >= "1.0+beta15" } "tezos-base" - "tezos-embedded-client-genesis" - "tezos-embedded-client-alpha" "tezos-client-base" + "tezos-client-genesis" + "tezos-client-alpha" ] build: [ [ "jbuilder" "build" "-p" name "-j" jobs ] diff --git a/src/lib_protocol_compiler/jbuild_embedded_protocol_template b/src/lib_protocol_compiler/jbuild_embedded_protocol_template index fc9e1c44e..3e5ae8cbf 100644 --- a/src/lib_protocol_compiler/jbuild_embedded_protocol_template +++ b/src/lib_protocol_compiler/jbuild_embedded_protocol_template @@ -1,7 +1,7 @@ (* -*- tuareg -*- *) -let prefix = "lib_protocol_" -let dirname = Filename.basename @@ Filename.dirname @@ Sys.getcwd () +let prefix = "proto_" +let dirname = Filename.basename @@ Filename.dirname @@ Filename.dirname @@ Sys.getcwd () let predefined_version = None (* to be substituted in opam packages *) diff --git a/src/lib_protocol_compiler/jbuild_protocol_template b/src/lib_protocol_compiler/jbuild_protocol_template index b80125bbb..907154d92 100644 --- a/src/lib_protocol_compiler/jbuild_protocol_template +++ b/src/lib_protocol_compiler/jbuild_protocol_template @@ -11,8 +11,8 @@ #require "unix" -let prefix = "lib_protocol_" -let dirname = Filename.basename @@ Sys.getcwd () +let prefix = "proto_" +let dirname = Filename.basename @@ Filename.dirname @@ Sys.getcwd () let predefined_version = None (* to be substituted in opam packages *) @@ -28,7 +28,7 @@ let version = let path = match predefined_version with - | None -> "src/proto_" ^ version ^ "/lib_protocol_" ^ version + | None -> "src/proto_" ^ version ^ "/lib_protocol" | Some _ -> "." let sources = diff --git a/src/proto_alpha/lib_client/jbuild b/src/proto_alpha/lib_client/jbuild index 43d64d56a..1275f14f0 100644 --- a/src/proto_alpha/lib_client/jbuild +++ b/src/proto_alpha/lib_client/jbuild @@ -1,8 +1,8 @@ (jbuild_version 1) (library - ((name tezos_embedded_client_alpha) - (public_name tezos-embedded-client-alpha) + ((name tezos_client_alpha) + (public_name tezos-client-alpha) (libraries (tezos-base tezos-protocol-alpha tezos-client-environment diff --git a/src/proto_alpha/lib_client/tezos-embedded-client-alpha.opam b/src/proto_alpha/lib_client/tezos-client-alpha.opam similarity index 100% rename from src/proto_alpha/lib_client/tezos-embedded-client-alpha.opam rename to src/proto_alpha/lib_client/tezos-client-alpha.opam diff --git a/src/proto_genesis/lib_client/client_proto_main.ml b/src/proto_genesis/lib_client/client_proto_main.ml index 86ac03e4e..025692588 100644 --- a/src/proto_genesis/lib_client/client_proto_main.ml +++ b/src/proto_genesis/lib_client/client_proto_main.ml @@ -75,7 +75,7 @@ let commands () = @@ stop) begin fun timestamp hash fitness validation_passes seckey (cctxt : Client_commands.full_context) -> let fitness = - Tezos_embedded_client_alpha.Proto_alpha.Fitness_repr.from_int64 fitness in + Tezos_client_alpha.Proto_alpha.Fitness_repr.from_int64 fitness in bake cctxt ?timestamp cctxt#block (Activate { protocol = hash ; validation_passes ; fitness }) seckey >>=? fun hash -> diff --git a/src/proto_genesis/lib_client/jbuild b/src/proto_genesis/lib_client/jbuild index df0594e91..99235ca6a 100644 --- a/src/proto_genesis/lib_client/jbuild +++ b/src/proto_genesis/lib_client/jbuild @@ -1,13 +1,13 @@ (jbuild_version 1) (library - ((name tezos_embedded_client_genesis) - (public_name tezos-embedded-client-genesis) + ((name tezos_client_genesis) + (public_name tezos-client-genesis) (libraries (tezos-base tezos-shell-services tezos-client-base tezos-client-environment - tezos-embedded-client-alpha + tezos-client-alpha tezos-protocol-genesis)) (library_flags (:standard -linkall)) (flags (:standard -w -9+27-30-32-40@8 diff --git a/src/proto_genesis/lib_client/tezos-embedded-client-genesis.opam b/src/proto_genesis/lib_client/tezos-client-genesis.opam similarity index 95% rename from src/proto_genesis/lib_client/tezos-embedded-client-genesis.opam rename to src/proto_genesis/lib_client/tezos-client-genesis.opam index e95e0a103..0edf22148 100644 --- a/src/proto_genesis/lib_client/tezos-embedded-client-genesis.opam +++ b/src/proto_genesis/lib_client/tezos-client-genesis.opam @@ -10,11 +10,11 @@ depends: [ "ocamlfind" { build } "jbuilder" { build & >= "1.0+beta15" } "tezos-base" - "tezos-protocol-genesis" - "tezos-protocol-alpha" "tezos-shell-services" "tezos-client-base" "tezos-client-environment" + "tezos-client-alpha" + "tezos-protocol-genesis" ] build: [ [ "jbuilder" "build" "-p" name "-j" jobs ] diff --git a/test/proto_alpha/jbuild b/test/proto_alpha/jbuild index 82ca1134b..40fe0e48c 100644 --- a/test/proto_alpha/jbuild +++ b/test/proto_alpha/jbuild @@ -9,15 +9,15 @@ (libraries (tezos-base tezos-rpc-http tezos-client-base - tezos-embedded-client-genesis - tezos-embedded-client-alpha + tezos-client-genesis + tezos-client-alpha test_lib)) (flags (:standard -w -9-32 -safe-string -open Tezos_base__TzPervasives -open Tezos_rpc_http -open Tezos_client_base - -open Tezos_embedded_client_genesis - -open Tezos_embedded_client_alpha)))) + -open Tezos_client_genesis + -open Tezos_client_alpha)))) (alias ((name buildtest) diff --git a/test/proto_alpha/proto_alpha_helpers.ml b/test/proto_alpha/proto_alpha_helpers.ml index 94c918881..3af85c104 100644 --- a/test/proto_alpha/proto_alpha_helpers.ml +++ b/test/proto_alpha/proto_alpha_helpers.ml @@ -40,7 +40,7 @@ let dictator_sk = let activate_alpha () = let fitness = Fitness_repr.from_int64 0L in - Tezos_embedded_client_genesis.Client_proto_main.bake + Tezos_client_genesis.Client_proto_main.bake (new Client_rpcs.http_ctxt !rpc_config) (`Head 0) (Activate { protocol = Client_proto_main.protocol ; validation_passes = 1 ; fitness })