From 3d212459595d2630b6e8d80dcf289098fc0e3d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Fri, 27 Oct 2017 20:23:02 +0200 Subject: [PATCH] Rename `tezos_compiler.ml` --- src/Makefile.files | 4 ++-- src/client/client_protocols.ml | 2 +- src/compiler/{tezos_compiler.ml => native.ml} | 0 src/compiler/{tezos_compiler.mli => native.mli} | 0 src/compiler/node_compiler_main.ml | 4 ++-- src/compiler_main.ml | 2 +- src/node/updater/updater.ml | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) rename src/compiler/{tezos_compiler.ml => native.ml} (100%) rename src/compiler/{tezos_compiler.mli => native.mli} (100%) diff --git a/src/Makefile.files b/src/Makefile.files index 86637e668..970b8e3ff 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -161,13 +161,13 @@ COMPILER_LIB_INTFS := \ compiler/embedded_cmis.mli \ compiler/registerer.mli \ compiler/packer.mli \ - compiler/tezos_compiler.mli \ + compiler/native.mli \ COMPILER_LIB_IMPLS := \ compiler/embedded_cmis.ml \ compiler/registerer.ml \ compiler/packer.ml \ - compiler/tezos_compiler.ml \ + compiler/native.ml \ COMPILER_IMPLS := \ compiler_main.ml \ diff --git a/src/client/client_protocols.ml b/src/client/client_protocols.ml index a2205e5b2..0bbc41418 100644 --- a/src/client/client_protocols.ml +++ b/src/client/client_protocols.ml @@ -39,7 +39,7 @@ let commands () = (fun () dirname cctxt -> Lwt.catch (fun () -> - let _hash, proto = Tezos_compiler.read_dir dirname in + let _hash, proto = Native.read_dir dirname in Client_node_rpcs.inject_protocol cctxt.rpc_config proto >>= function | Ok hash -> cctxt.message "Injected protocol %a successfully" Protocol_hash.pp_short hash >>= fun () -> diff --git a/src/compiler/tezos_compiler.ml b/src/compiler/native.ml similarity index 100% rename from src/compiler/tezos_compiler.ml rename to src/compiler/native.ml diff --git a/src/compiler/tezos_compiler.mli b/src/compiler/native.mli similarity index 100% rename from src/compiler/tezos_compiler.mli rename to src/compiler/native.mli diff --git a/src/compiler/node_compiler_main.ml b/src/compiler/node_compiler_main.ml index cd5c71cbd..15e41eab2 100644 --- a/src/compiler/node_compiler_main.ml +++ b/src/compiler/node_compiler_main.ml @@ -13,14 +13,14 @@ let packer_name = "tezos-protocol-packer" let () = if Filename.basename Sys.argv.(0) = packer_name then begin try - Tezos_compiler.main (); + Native.main (); Pervasives.exit 0 with exn -> Format.eprintf "%a\n%!" Opterrors.report_error exn; Pervasives.exit 1 end else if Filename.basename Sys.argv.(0) = compiler_name then begin try - Tezos_compiler.main (); + Native.main (); Pervasives.exit 0 with exn -> Format.eprintf "%a\n%!" Opterrors.report_error exn; diff --git a/src/compiler_main.ml b/src/compiler_main.ml index 42ffd3ce2..de6366ed5 100644 --- a/src/compiler_main.ml +++ b/src/compiler_main.ml @@ -9,7 +9,7 @@ let () = try - Tezos_compiler.main (); + Native.main (); Pervasives.exit 0 with exn -> Format.eprintf "%a\n%!" Opterrors.report_error exn; diff --git a/src/node/updater/updater.ml b/src/node/updater/updater.ml index 0326a9087..39e056ef7 100644 --- a/src/node/updater/updater.ml +++ b/src/node/updater/updater.ml @@ -60,7 +60,7 @@ let create_files dir units = let extract dir ?hash (p: Protocol.t) = create_files dir p.components >>= fun _files -> - Tezos_compiler.Meta.to_file dir + Native.Meta.to_file dir ?hash ~env_version:p.expected_env (List.map (fun {Protocol.name} -> String.capitalize_ascii name) p.components) ; @@ -76,7 +76,7 @@ let do_compile hash p = Format.asprintf "protocol_%a.cmxs" Protocol_hash.pp hash in create_files source_dir units >>= fun _files -> - Tezos_compiler.Meta.to_file source_dir ~hash + Native.Meta.to_file source_dir ~hash (List.map (fun {Protocol.name} -> String.capitalize_ascii name) units); let compiler_command = (Sys.executable_name,