From 9dcc54a90cfe5b28e9a5d8871ba61baba0c43d9a Mon Sep 17 00:00:00 2001 From: Richard Davison Date: Fri, 14 Oct 2022 13:19:42 -0400 Subject: [PATCH 1/2] Octez: Improve pretty printing of warning message --- src/bin_codec/codec.ml | 3 ++- src/bin_node/main.ml | 3 ++- src/bin_proxy_server/main_proxy_server.ml | 3 ++- src/bin_snoop/main_snoop.ml | 3 ++- src/bin_validation/bin/main_validator.ml | 3 ++- src/lib_client_base_unix/client_main_run.ml | 4 ++-- src/lib_protocol_compiler/bin/main_embedded_packer.ml | 3 ++- src/lib_protocol_compiler/bin/main_native.ml | 3 ++- src/lib_protocol_compiler/bin/main_packer.ml | 3 ++- 9 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/bin_codec/codec.ml b/src/bin_codec/codec.ml index 4af4266cc56f..63230998fbd8 100644 --- a/src/bin_codec/codec.ml +++ b/src/bin_codec/codec.ml @@ -39,7 +39,8 @@ let warn_if_argv0_name_not_octez () = in Format.eprintf "@[@{@{Warning@}@}@,\ - The executable with name %s has been renamed to %s. The name %s is now@,\ + The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ + The name @{<kwd>%s@} is now@,\ deprecated, and it will be removed in a future release. Please update@,\ your scripts to use the new name.@]@\n\ @." diff --git a/src/bin_node/main.ml b/src/bin_node/main.ml index ae93f840ae53..ca0ed293cf3d 100644 --- a/src/bin_node/main.ml +++ b/src/bin_node/main.ml @@ -38,7 +38,8 @@ let warn_if_argv0_name_not_octez () = in Format.eprintf "@[<v 2>@{<warning>@{<title>Warning@}@}@,\ - The executable with name %s has been renamed to %s. The name %s is now@,\ + The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ + The name @{<kwd>%s@} is now@,\ deprecated, and it will be removed in a future release. Please update@,\ your scripts to use the new name.@]@\n\ @." diff --git a/src/bin_proxy_server/main_proxy_server.ml b/src/bin_proxy_server/main_proxy_server.ml index 92a815734ede..3e4d2a9a660e 100644 --- a/src/bin_proxy_server/main_proxy_server.ml +++ b/src/bin_proxy_server/main_proxy_server.ml @@ -41,7 +41,8 @@ let () = in Format.eprintf "@[<v 2>@{<warning>@{<title>Warning@}@}@,\ - The executable with name %s has been renamed to %s. The name %s is now@,\ + The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ + The name @{<kwd>%s@} is now@,\ deprecated, and it will be removed in a future release. Please update@,\ your scripts to use the new name.@]@\n\ @." diff --git a/src/bin_snoop/main_snoop.ml b/src/bin_snoop/main_snoop.ml index 8b8ab0b1d72d..6d11b5475b17 100644 --- a/src/bin_snoop/main_snoop.ml +++ b/src/bin_snoop/main_snoop.ml @@ -38,7 +38,8 @@ let () = in Format.eprintf "@[<v 2>@{<warning>@{<title>Warning@}@}@,\ - The executable with name %s has been renamed to %s. The name %s is now@,\ + The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ + The name @{<kwd>%s@} is now@,\ deprecated, and it will be removed in a future release. Please update@,\ your scripts to use the new name.@]@\n\ @." diff --git a/src/bin_validation/bin/main_validator.ml b/src/bin_validation/bin/main_validator.ml index c43a45fcd7b1..16c4e095895a 100644 --- a/src/bin_validation/bin/main_validator.ml +++ b/src/bin_validation/bin/main_validator.ml @@ -38,7 +38,8 @@ let () = in Format.eprintf "@[<v 2>@{<warning>@{<title>Warning@}@}@,\ - The executable with name %s has been renamed to %s. The name %s is now@,\ + The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ + The name @{<kwd>%s@} is now@,\ deprecated, and it will be removed in a future release. Please update@,\ your scripts to use the new name.@]@\n\ @." diff --git a/src/lib_client_base_unix/client_main_run.ml b/src/lib_client_base_unix/client_main_run.ml index 2fd4c5a4beaf..84e4f9dabec6 100644 --- a/src/lib_client_base_unix/client_main_run.ml +++ b/src/lib_client_base_unix/client_main_run.ml @@ -344,8 +344,8 @@ let warn_if_argv0_name_not_octez () = | Some expected_name -> Format.eprintf "@[<v 2>@{<warning>@{<title>Warning@}@}@,\ - The executable with name %s has been renamed to %s. The name %s is \ - now@,\ + The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ + The name @{<kwd>%s@} is now@,\ deprecated, and it will be removed in a future release. Please update@,\ your scripts to use the new name.@]@\n\ @." diff --git a/src/lib_protocol_compiler/bin/main_embedded_packer.ml b/src/lib_protocol_compiler/bin/main_embedded_packer.ml index 2fee9d6bceaf..e3c2f34bf8ab 100644 --- a/src/lib_protocol_compiler/bin/main_embedded_packer.ml +++ b/src/lib_protocol_compiler/bin/main_embedded_packer.ml @@ -38,7 +38,8 @@ let () = in Format.eprintf "@[<v 2>@{<warning>@{<title>Warning@}@}@,\ - The executable with name %s has been renamed to %s. The name %s is now@,\ + The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ + The name @{<kwd>%s@} is now@,\ deprecated, and it will be removed in a future release. Please update@,\ your scripts to use the new name.@]@\n\ @." diff --git a/src/lib_protocol_compiler/bin/main_native.ml b/src/lib_protocol_compiler/bin/main_native.ml index c5e0a418352b..032344acd0c1 100644 --- a/src/lib_protocol_compiler/bin/main_native.ml +++ b/src/lib_protocol_compiler/bin/main_native.ml @@ -39,7 +39,8 @@ let () = in Format.eprintf "@[<v 2>@{<warning>@{<title>Warning@}@}@,\ - The executable with name %s has been renamed to %s. The name %s is now@,\ + The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ + The name @{<kwd>%s@} is now@,\ deprecated, and it will be removed in a future release. Please update@,\ your scripts to use the new name.@]@\n\ @." diff --git a/src/lib_protocol_compiler/bin/main_packer.ml b/src/lib_protocol_compiler/bin/main_packer.ml index f168881eb000..8637f2ebcb8a 100644 --- a/src/lib_protocol_compiler/bin/main_packer.ml +++ b/src/lib_protocol_compiler/bin/main_packer.ml @@ -40,7 +40,8 @@ let () = in Format.eprintf "@[<v 2>@{<warning>@{<title>Warning@}@}@,\ - The executable with name %s has been renamed to %s. The name %s is now@,\ + The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ + The name @{<kwd>%s@} is now@,\ deprecated, and it will be removed in a future release. Please update@,\ your scripts to use the new name.@]@\n\ @." -- GitLab From a96769050de0af63a54f4fc318027eb1251119bf Mon Sep 17 00:00:00 2001 From: Richard Davison <richardneildavison@gmail.com> Date: Fri, 14 Oct 2022 13:20:40 -0400 Subject: [PATCH 2/2] Octez: Remove version number in warning message. --- src/bin_codec/codec.ml | 2 + src/bin_node/main.ml | 2 + src/bin_proxy_server/main_proxy_server.ml | 2 + src/bin_snoop/main_snoop.ml | 2 + src/bin_validation/bin/main_validator.ml | 2 + src/lib_client_base_unix/client_main_run.ml | 82 +++++++++++++------ .../bin/main_embedded_packer.ml | 2 + src/lib_protocol_compiler/bin/main_native.ml | 2 + src/lib_protocol_compiler/bin/main_packer.ml | 2 + .../main_tx_rollup_client_014_PtKathma.ml | 73 +++++++++++++++++ .../main_tx_rollup_client_015_PtLimaPt.ml | 73 +++++++++++++++++ .../main_tx_rollup_client_alpha.ml | 73 +++++++++++++++++ 12 files changed, 294 insertions(+), 23 deletions(-) diff --git a/src/bin_codec/codec.ml b/src/bin_codec/codec.ml index 63230998fbd8..a4a06d9ad429 100644 --- a/src/bin_codec/codec.ml +++ b/src/bin_codec/codec.ml @@ -25,6 +25,8 @@ let () = Additional_registrations.force_linking () +(* FIXME: https://gitlab.com/tezos/tezos/-/issues/4025 + Remove backwards compatible Tezos symlinks. *) let warn_if_argv0_name_not_octez () = let executable_name = Filename.basename Sys.argv.(0) in let prefix = "tezos-" in diff --git a/src/bin_node/main.ml b/src/bin_node/main.ml index ca0ed293cf3d..f95805aa614b 100644 --- a/src/bin_node/main.ml +++ b/src/bin_node/main.ml @@ -24,6 +24,8 @@ (* *) (*****************************************************************************) +(* FIXME: https://gitlab.com/tezos/tezos/-/issues/4025 + Remove backwards compatible Tezos symlinks. *) let warn_if_argv0_name_not_octez () = let executable_name = Filename.basename Sys.argv.(0) in let prefix = "tezos-" in diff --git a/src/bin_proxy_server/main_proxy_server.ml b/src/bin_proxy_server/main_proxy_server.ml index 3e4d2a9a660e..b61fdccbb47c 100644 --- a/src/bin_proxy_server/main_proxy_server.ml +++ b/src/bin_proxy_server/main_proxy_server.ml @@ -26,6 +26,8 @@ open Cmdliner module Proxy_server_config = Tezos_proxy_server_config.Proxy_server_config +(* FIXME: https://gitlab.com/tezos/tezos/-/issues/4025 + Remove backwards compatible Tezos symlinks. *) let () = (* warn_if_argv0_name_not_octez *) let executable_name = Filename.basename Sys.argv.(0) in diff --git a/src/bin_snoop/main_snoop.ml b/src/bin_snoop/main_snoop.ml index 6d11b5475b17..c650e17da762 100644 --- a/src/bin_snoop/main_snoop.ml +++ b/src/bin_snoop/main_snoop.ml @@ -23,6 +23,8 @@ (* *) (*****************************************************************************) +(* FIXME: https://gitlab.com/tezos/tezos/-/issues/4025 + Remove backwards compatible Tezos symlinks. *) let () = (* warn_if_argv0_name_not_octez *) let executable_name = Filename.basename Sys.argv.(0) in diff --git a/src/bin_validation/bin/main_validator.ml b/src/bin_validation/bin/main_validator.ml index 16c4e095895a..8d87aacbbade 100644 --- a/src/bin_validation/bin/main_validator.ml +++ b/src/bin_validation/bin/main_validator.ml @@ -23,6 +23,8 @@ (* *) (*****************************************************************************) +(* FIXME: https://gitlab.com/tezos/tezos/-/issues/4025 + Remove backwards compatible Tezos symlinks. *) let () = (* warn_if_argv0_name_not_octez *) let executable_name = Filename.basename Sys.argv.(0) in diff --git a/src/lib_client_base_unix/client_main_run.ml b/src/lib_client_base_unix/client_main_run.ml index 84e4f9dabec6..3b8e12d2510d 100644 --- a/src/lib_client_base_unix/client_main_run.ml +++ b/src/lib_client_base_unix/client_main_run.ml @@ -317,31 +317,67 @@ let setup_client_config (cctxt : Tezos_client_base.Client_context.printer) setup_non_mockup_rpc_client_config m | `Mode_mockup -> setup_mockup_rpc_client_config cctxt args base_dir) +(* FIXME: https://gitlab.com/tezos/tezos/-/issues/4025 + Remove backwards compatible Tezos symlinks. *) let warn_if_argv0_name_not_octez () = - let keep_version_number = true in - let executable_name = Filename.basename Sys.argv.(0) in - let expected_name = - match TzString.split '-' executable_name with - | prefix :: (("endorser" | "accuser" | "baker") as bin) :: arg :: rest -> - let has_version_number = int_of_string_opt arg <> None in - if String.equal prefix "tezos" || has_version_number then - if has_version_number then - if keep_version_number then - Some (String.concat "-" ("octez" :: bin :: arg :: rest)) - else Some (String.concat "-" ("octez" :: bin :: rest)) - else Some (String.concat "-" ("octez" :: bin :: arg :: rest)) - else None - | "tezos" :: rest -> Some (String.concat "-" ("octez" :: rest)) - | _ -> None + let executable_name = + (* example: tezos-tx-rollup-client-015-PtKathma *) + Filename.basename Sys.argv.(0) in - let expected_name = - Option.bind expected_name (fun expected_name -> - if String.equal executable_name expected_name then None - else Some expected_name) - in - match expected_name with - | None -> () - | Some expected_name -> + let old_head = "tezos-" in + let new_head = "octez-" in + match TzString.has_prefix executable_name ~prefix:old_head with + | false -> () + | true -> + let expected_name = + let len_prefix = String.length old_head in + let headless_name = + (* example: tx-rollup-client-015-PtKathma *) + String.sub + executable_name + len_prefix + (String.length executable_name - len_prefix) + in + let name_without_version name = + match headless_name |> String.starts_with ~prefix:name with + | false -> None + | true -> + let len_name = String.length name in + let version_proto = + (* example: -015-PtKathma *) + String.sub + headless_name + len_name + (String.length headless_name - len_name) + in + let num_hyphens = + (* example: 2 *) + version_proto + |> String.fold_left + (fun acc c -> match c with '-' -> acc + 1 | _ -> acc) + 0 + in + let proto = + (* example: -PtKathma *) + if num_hyphens = 2 then + String.sub version_proto 4 (String.length version_proto - 4) + else version_proto + in + Some (name ^ proto) + in + (* example: tx-rollup-client-PtKathma *) + let versionless_name = + ["accuser"; "baker"; "tx-rollup-client"; "tx-rollup-node"] + |> List.map name_without_version + |> List.find Option.is_some |> Option.join + in + (* example: octez-tx-rollup-client-PtKathma *) + new_head + ^ + match versionless_name with + | None -> headless_name + | Some versionless_name -> versionless_name + in Format.eprintf "@[<v 2>@{<warning>@{<title>Warning@}@}@,\ The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ diff --git a/src/lib_protocol_compiler/bin/main_embedded_packer.ml b/src/lib_protocol_compiler/bin/main_embedded_packer.ml index e3c2f34bf8ab..6d80cfb27bec 100644 --- a/src/lib_protocol_compiler/bin/main_embedded_packer.ml +++ b/src/lib_protocol_compiler/bin/main_embedded_packer.ml @@ -23,6 +23,8 @@ (* *) (*****************************************************************************) +(* FIXME: https://gitlab.com/tezos/tezos/-/issues/4025 + Remove backwards compatible Tezos symlinks. *) let () = (* warn_if_argv0_name_not_octez *) let executable_name = Filename.basename Sys.argv.(0) in diff --git a/src/lib_protocol_compiler/bin/main_native.ml b/src/lib_protocol_compiler/bin/main_native.ml index 032344acd0c1..36a479c9d894 100644 --- a/src/lib_protocol_compiler/bin/main_native.ml +++ b/src/lib_protocol_compiler/bin/main_native.ml @@ -23,6 +23,8 @@ (* *) (*****************************************************************************) +(* FIXME: https://gitlab.com/tezos/tezos/-/issues/4025 + Remove backwards compatible Tezos symlinks. *) let () = (* warn_if_argv0_name_not_octez *) let executable_name = Filename.basename Sys.argv.(0) in diff --git a/src/lib_protocol_compiler/bin/main_packer.ml b/src/lib_protocol_compiler/bin/main_packer.ml index 8637f2ebcb8a..e053856832c1 100644 --- a/src/lib_protocol_compiler/bin/main_packer.ml +++ b/src/lib_protocol_compiler/bin/main_packer.ml @@ -25,6 +25,8 @@ open Filename.Infix +(* FIXME: https://gitlab.com/tezos/tezos/-/issues/4025 + Remove backwards compatible Tezos symlinks. *) let () = (* warn_if_argv0_name_not_octez *) let executable_name = Filename.basename Sys.argv.(0) in diff --git a/src/proto_014_PtKathma/bin_tx_rollup_client/main_tx_rollup_client_014_PtKathma.ml b/src/proto_014_PtKathma/bin_tx_rollup_client/main_tx_rollup_client_014_PtKathma.ml index bb6b4fba9684..f42601fe7657 100644 --- a/src/proto_014_PtKathma/bin_tx_rollup_client/main_tx_rollup_client_014_PtKathma.ml +++ b/src/proto_014_PtKathma/bin_tx_rollup_client/main_tx_rollup_client_014_PtKathma.ml @@ -31,7 +31,80 @@ let register_signers () = Tezos_client_base.Client_keys.register_aggregate_signer (module Tezos_signer_backends.Unencrypted.Aggregate) +(* FIXME: https://gitlab.com/tezos/tezos/-/issues/4025 + Remove backwards compatible Tezos symlinks. *) +let warn_if_argv0_name_not_octez () = + let executable_name = + (* example: tezos-tx-rollup-client-015-PtKathma *) + Filename.basename Sys.argv.(0) + in + let old_head = "tezos-" in + let new_head = "octez-" in + match TzString.has_prefix executable_name ~prefix:old_head with + | false -> () + | true -> + let expected_name = + let len_prefix = String.length old_head in + let headless_name = + (* example: tx-rollup-client-015-PtKathma *) + String.sub + executable_name + len_prefix + (String.length executable_name - len_prefix) + in + let name_without_version name = + match headless_name |> String.starts_with ~prefix:name with + | false -> None + | true -> + let len_name = String.length name in + let version_proto = + (* example: -015-PtKathma *) + String.sub + headless_name + len_name + (String.length headless_name - len_name) + in + let num_hyphens = + (* example: 2 *) + version_proto + |> String.fold_left + (fun acc c -> match c with '-' -> acc + 1 | _ -> acc) + 0 + in + let proto = + (* example: -PtKathma *) + if num_hyphens = 2 then + String.sub version_proto 4 (String.length version_proto - 4) + else version_proto + in + Some (name ^ proto) + in + (* example: tx-rollup-client-PtKathma *) + let versionless_name = + ["accuser"; "baker"; "tx-rollup-client"; "tx-rollup-node"] + |> List.map name_without_version + |> List.find Option.is_some |> Option.join + in + (* example: octez-tx-rollup-client-PtKathma *) + new_head + ^ + match versionless_name with + | None -> headless_name + | Some versionless_name -> versionless_name + in + Format.eprintf + "@[<v 2>@{<warning>@{<title>Warning@}@}@,\ + The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ + The name @{<kwd>%s@} is now@,\ + deprecated, and it will be removed in a future release. Please update@,\ + your scripts to use the new name.@]@\n\ + @." + executable_name + expected_name + executable_name + let main () = + warn_if_argv0_name_not_octez () ; Configuration.parse (argv ()) >>=? fun (configuration, argv) -> register_signers () ; let cctxt = Configuration.make_unix_client_context configuration in diff --git a/src/proto_015_PtLimaPt/bin_tx_rollup_client/main_tx_rollup_client_015_PtLimaPt.ml b/src/proto_015_PtLimaPt/bin_tx_rollup_client/main_tx_rollup_client_015_PtLimaPt.ml index bb6b4fba9684..f42601fe7657 100644 --- a/src/proto_015_PtLimaPt/bin_tx_rollup_client/main_tx_rollup_client_015_PtLimaPt.ml +++ b/src/proto_015_PtLimaPt/bin_tx_rollup_client/main_tx_rollup_client_015_PtLimaPt.ml @@ -31,7 +31,80 @@ let register_signers () = Tezos_client_base.Client_keys.register_aggregate_signer (module Tezos_signer_backends.Unencrypted.Aggregate) +(* FIXME: https://gitlab.com/tezos/tezos/-/issues/4025 + Remove backwards compatible Tezos symlinks. *) +let warn_if_argv0_name_not_octez () = + let executable_name = + (* example: tezos-tx-rollup-client-015-PtKathma *) + Filename.basename Sys.argv.(0) + in + let old_head = "tezos-" in + let new_head = "octez-" in + match TzString.has_prefix executable_name ~prefix:old_head with + | false -> () + | true -> + let expected_name = + let len_prefix = String.length old_head in + let headless_name = + (* example: tx-rollup-client-015-PtKathma *) + String.sub + executable_name + len_prefix + (String.length executable_name - len_prefix) + in + let name_without_version name = + match headless_name |> String.starts_with ~prefix:name with + | false -> None + | true -> + let len_name = String.length name in + let version_proto = + (* example: -015-PtKathma *) + String.sub + headless_name + len_name + (String.length headless_name - len_name) + in + let num_hyphens = + (* example: 2 *) + version_proto + |> String.fold_left + (fun acc c -> match c with '-' -> acc + 1 | _ -> acc) + 0 + in + let proto = + (* example: -PtKathma *) + if num_hyphens = 2 then + String.sub version_proto 4 (String.length version_proto - 4) + else version_proto + in + Some (name ^ proto) + in + (* example: tx-rollup-client-PtKathma *) + let versionless_name = + ["accuser"; "baker"; "tx-rollup-client"; "tx-rollup-node"] + |> List.map name_without_version + |> List.find Option.is_some |> Option.join + in + (* example: octez-tx-rollup-client-PtKathma *) + new_head + ^ + match versionless_name with + | None -> headless_name + | Some versionless_name -> versionless_name + in + Format.eprintf + "@[<v 2>@{<warning>@{<title>Warning@}@}@,\ + The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ + The name @{<kwd>%s@} is now@,\ + deprecated, and it will be removed in a future release. Please update@,\ + your scripts to use the new name.@]@\n\ + @." + executable_name + expected_name + executable_name + let main () = + warn_if_argv0_name_not_octez () ; Configuration.parse (argv ()) >>=? fun (configuration, argv) -> register_signers () ; let cctxt = Configuration.make_unix_client_context configuration in diff --git a/src/proto_alpha/bin_tx_rollup_client/main_tx_rollup_client_alpha.ml b/src/proto_alpha/bin_tx_rollup_client/main_tx_rollup_client_alpha.ml index bb6b4fba9684..f42601fe7657 100644 --- a/src/proto_alpha/bin_tx_rollup_client/main_tx_rollup_client_alpha.ml +++ b/src/proto_alpha/bin_tx_rollup_client/main_tx_rollup_client_alpha.ml @@ -31,7 +31,80 @@ let register_signers () = Tezos_client_base.Client_keys.register_aggregate_signer (module Tezos_signer_backends.Unencrypted.Aggregate) +(* FIXME: https://gitlab.com/tezos/tezos/-/issues/4025 + Remove backwards compatible Tezos symlinks. *) +let warn_if_argv0_name_not_octez () = + let executable_name = + (* example: tezos-tx-rollup-client-015-PtKathma *) + Filename.basename Sys.argv.(0) + in + let old_head = "tezos-" in + let new_head = "octez-" in + match TzString.has_prefix executable_name ~prefix:old_head with + | false -> () + | true -> + let expected_name = + let len_prefix = String.length old_head in + let headless_name = + (* example: tx-rollup-client-015-PtKathma *) + String.sub + executable_name + len_prefix + (String.length executable_name - len_prefix) + in + let name_without_version name = + match headless_name |> String.starts_with ~prefix:name with + | false -> None + | true -> + let len_name = String.length name in + let version_proto = + (* example: -015-PtKathma *) + String.sub + headless_name + len_name + (String.length headless_name - len_name) + in + let num_hyphens = + (* example: 2 *) + version_proto + |> String.fold_left + (fun acc c -> match c with '-' -> acc + 1 | _ -> acc) + 0 + in + let proto = + (* example: -PtKathma *) + if num_hyphens = 2 then + String.sub version_proto 4 (String.length version_proto - 4) + else version_proto + in + Some (name ^ proto) + in + (* example: tx-rollup-client-PtKathma *) + let versionless_name = + ["accuser"; "baker"; "tx-rollup-client"; "tx-rollup-node"] + |> List.map name_without_version + |> List.find Option.is_some |> Option.join + in + (* example: octez-tx-rollup-client-PtKathma *) + new_head + ^ + match versionless_name with + | None -> headless_name + | Some versionless_name -> versionless_name + in + Format.eprintf + "@[<v 2>@{<warning>@{<title>Warning@}@}@,\ + The executable with name @{<kwd>%s@} has been renamed to @{<kwd>%s@}. \ + The name @{<kwd>%s@} is now@,\ + deprecated, and it will be removed in a future release. Please update@,\ + your scripts to use the new name.@]@\n\ + @." + executable_name + expected_name + executable_name + let main () = + warn_if_argv0_name_not_octez () ; Configuration.parse (argv ()) >>=? fun (configuration, argv) -> register_signers () ; let cctxt = Configuration.make_unix_client_context configuration in -- GitLab