From e928a776133492a676fa173871a917de80cb1c59 Mon Sep 17 00:00:00 2001 From: Zachinquarantine Date: Mon, 2 Aug 2021 16:27:58 -0400 Subject: [PATCH 1/4] cmd/utils: actually show Aliased Flags as deprecated I'm working on getting the Aliased RPC flags removed entirely over at my fork of geth, but, until then, this will actually show the RPC commands as deprecated when someone runs ``geth show-deprecated-flags``. --- cmd/utils/flags_legacy.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/utils/flags_legacy.go b/cmd/utils/flags_legacy.go index fb5fde6576959..b4e818edd42dc 100644 --- a/cmd/utils/flags_legacy.go +++ b/cmd/utils/flags_legacy.go @@ -75,6 +75,11 @@ func showDeprecated(*cli.Context) { fmt.Println("--------------------------------------------------------------------") fmt.Println() // TODO remove when there are newly deprecated flags - fmt.Println("no deprecated flags to show at this time") - fmt.Println() + fmt.Println("--nousb") + fmt.Println("--rpc") + fmt.Println("--rpcaddr value") + fmt.Println("--rpcport value") + fmt.Println("--rpccorsdomain value") + fmt.Println("--rpcvhosts value") + fmt.Println("--rpcapi value") } From cc0c6541881f7df593fedbf8e2d97c549190ba2c Mon Sep 17 00:00:00 2001 From: Zachinquarantine Date: Mon, 2 Aug 2021 16:30:37 -0400 Subject: [PATCH 2/4] changes note and fixes end --- cmd/utils/flags_legacy.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/utils/flags_legacy.go b/cmd/utils/flags_legacy.go index b4e818edd42dc..22fc023e0eec1 100644 --- a/cmd/utils/flags_legacy.go +++ b/cmd/utils/flags_legacy.go @@ -74,7 +74,7 @@ func showDeprecated(*cli.Context) { fmt.Println("The following flags are deprecated and will be removed in the future!") fmt.Println("--------------------------------------------------------------------") fmt.Println() - // TODO remove when there are newly deprecated flags + // These are the deprecated aliased flags fmt.Println("--nousb") fmt.Println("--rpc") fmt.Println("--rpcaddr value") @@ -82,4 +82,5 @@ func showDeprecated(*cli.Context) { fmt.Println("--rpccorsdomain value") fmt.Println("--rpcvhosts value") fmt.Println("--rpcapi value") + fmt.Println() } From 8c17d8480e15b295af4f9c6a8c478f77800c7eb1 Mon Sep 17 00:00:00 2001 From: Zachinquarantine Date: Wed, 4 Aug 2021 19:05:42 -0400 Subject: [PATCH 3/4] bundle everything up --- cmd/utils/flags_legacy.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/cmd/utils/flags_legacy.go b/cmd/utils/flags_legacy.go index 22fc023e0eec1..ab678061efe35 100644 --- a/cmd/utils/flags_legacy.go +++ b/cmd/utils/flags_legacy.go @@ -74,13 +74,7 @@ func showDeprecated(*cli.Context) { fmt.Println("The following flags are deprecated and will be removed in the future!") fmt.Println("--------------------------------------------------------------------") fmt.Println() - // These are the deprecated aliased flags - fmt.Println("--nousb") - fmt.Println("--rpc") - fmt.Println("--rpcaddr value") - fmt.Println("--rpcport value") - fmt.Println("--rpccorsdomain value") - fmt.Println("--rpcvhosts value") - fmt.Println("--rpcapi value") - fmt.Println() -} + +for _, flag := range DeprecatedFlags { + fmt.Println(flag.String()) + } From 6b56a75394d93b51fd6f659faced197e4249e713 Mon Sep 17 00:00:00 2001 From: Zachinquarantine Date: Fri, 6 Aug 2021 15:24:46 -0400 Subject: [PATCH 4/4] (hopefully) fix build error --- cmd/utils/flags_legacy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/utils/flags_legacy.go b/cmd/utils/flags_legacy.go index ab678061efe35..a70c95d04f9f7 100644 --- a/cmd/utils/flags_legacy.go +++ b/cmd/utils/flags_legacy.go @@ -77,4 +77,4 @@ func showDeprecated(*cli.Context) { for _, flag := range DeprecatedFlags { fmt.Println(flag.String()) - } +}