Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/flags: remove low-use type TextMarshalerFlag #30707

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

karalabe
Copy link
Member

Currently we have a custom TextMarshalerFlag. It's a nice idea, allowing anything implementing text marshaller to be used as a flag. That said, we only ever used it in one place because it's not that obvious how to use and it needs some boilerplate on the type itself too, apart of the heavy boilerplate got the custom flag.

All in all there's no need to drop this feature just now, but while porting the cmds over to cli @V3, all other custom flags worker perfectly, whereas this one started crashing deep inside the cli package. The flag handling in v3 got rebuild on generics and there are a number of new methods needed; and my guess is that maybe one of them doesn't work like this flag currently is designed too.

We could definitely try and redesign this flag for cli v3... but all that effort and boilerplate just to use it for 1 flag in 1 location, seems not worth it. So for now I'm suggesting removing it and maybe reconsider a similar feature in cli v3 with however it will work.

@karalabe karalabe requested a review from fjl October 31, 2024 13:33
@fjl fjl changed the title cmd, internal: remove low-use custom flag type internal/flags: remove low-use type TextMarshalerFlag Oct 31, 2024
@fjl fjl merged commit a1d049c into ethereum:master Oct 31, 2024
3 checks passed
GrapeBaBa pushed a commit to optimism-java/shisui that referenced this pull request Nov 2, 2024
Currently we have a custom TextMarshalerFlag. It's a nice idea, allowing
anything implementing text marshaller to be used as a flag. That said,
we only ever used it in one place because it's not that obvious how to
use and it needs some boilerplate on the type itself too, apart of the
heavy boilerplate got the custom flag.

All in all there's no *need* to drop this feature just now, but while
porting the cmds over to cli @V3, all other custom flags worker
perfectly, whereas this one started crashing deep inside the cli
package. The flag handling in v3 got rebuild on generics and there are a
number of new methods needed; and my guess is that maybe one of them
doesn't work like this flag currently is designed too.

We could definitely try and redesign this flag for cli v3... but all
that effort and boilerplate just to use it for 1 flag in 1 location,
seems not worth it. So for now I'm suggesting removing it and maybe
reconsider a similar feature in cli v3 with however it will work.
holiman pushed a commit that referenced this pull request Nov 19, 2024
Currently we have a custom TextMarshalerFlag. It's a nice idea, allowing
anything implementing text marshaller to be used as a flag. That said,
we only ever used it in one place because it's not that obvious how to
use and it needs some boilerplate on the type itself too, apart of the
heavy boilerplate got the custom flag.

All in all there's no *need* to drop this feature just now, but while
porting the cmds over to cli @V3, all other custom flags worker
perfectly, whereas this one started crashing deep inside the cli
package. The flag handling in v3 got rebuild on generics and there are a
number of new methods needed; and my guess is that maybe one of them
doesn't work like this flag currently is designed too.

We could definitely try and redesign this flag for cli v3... but all
that effort and boilerplate just to use it for 1 flag in 1 location,
seems not worth it. So for now I'm suggesting removing it and maybe
reconsider a similar feature in cli v3 with however it will work.
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 22, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 22, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 22, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 22, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 22, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 25, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 25, 2024
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Nov 25, 2024
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Nov 27, 2024
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Nov 27, 2024
zfy0701 pushed a commit to sentioxyz/go-ethereum that referenced this pull request Dec 3, 2024
Currently we have a custom TextMarshalerFlag. It's a nice idea, allowing
anything implementing text marshaller to be used as a flag. That said,
we only ever used it in one place because it's not that obvious how to
use and it needs some boilerplate on the type itself too, apart of the
heavy boilerplate got the custom flag.

All in all there's no *need* to drop this feature just now, but while
porting the cmds over to cli @V3, all other custom flags worker
perfectly, whereas this one started crashing deep inside the cli
package. The flag handling in v3 got rebuild on generics and there are a
number of new methods needed; and my guess is that maybe one of them
doesn't work like this flag currently is designed too.

We could definitely try and redesign this flag for cli v3... but all
that effort and boilerplate just to use it for 1 flag in 1 location,
seems not worth it. So for now I'm suggesting removing it and maybe
reconsider a similar feature in cli v3 with however it will work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants