The new implementation is compatible with the existing tests, otherwise,
there will be a lot of changes in the src and test directories.

Thanks,
Zixuan

Ran Gao <r...@apache.org> 于2024年2月26日周一 19:49写道:

> +1 (non-binding), it's more elegant. There will be a lot of changes, we
> can create some tasks based on commands.
>
> - Ran Gao
>
> On 2024/02/21 05:07:46 Zixuan Liu wrote:
> > Hi Pulsar Community,
> >
> > The pulsar CLI(pulsar-admin, pulsar-client, pulsar-shell, and so on) uses
> > the jcommander [1] as CLI parser, which is an awesome project, but the
> > maintainer is not active and cannot keep up with modern CLI
> > features(auto-completion, sub-command, native-images, suggest commands,
> and
> > so on). Then I found the picocli [2] project to meet these needs, which
> is
> > active and powerful. For comparison, please see [3].
> >
> > Error prompt:
> > ```
> > bin/pulsar-admin clusters update cluster-a -b
> >
> > # jcommander
> > Need to provide just 1 parameter
> >
> > # picocli
> > Unknown option: '-b'
> > ```
> >
> > Suggest commands:
> > ```
> > bin/pulsar-admin cluste
> >
> > # jcommander
> > Expected a command, got cluste
> >
> > # picocli
> > Unmatched argument at index 0: 'cluste'
> > Did you mean: pulsar-admin clusters?
> > ```
> >
> > What do you think about migrating CLI parse from jcommander to picocli?
> >
> > Thanks,
> > Zixuan
> >
> > [1] - https://github.com/cbeust/jcommander
> > [2] - https://picocli.info/
> > [3] - https://github.com/remkop/picocli/wiki/picocli-vs-JCommander
> >
>

Reply via email to