[
https://issues.apache.org/jira/browse/SOLR-17697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100723#comment-18100723
]
Jan Høydahl commented on SOLR-17697:
------------------------------------
This is a long running effort. And keeping a growing branch like this in sync
is extra work.
I'm wondering whether we should consider bringing current picocli work to main
branch. And let each new tool ported be normal PRs against main.
We'd keep the default be commons-cli as now. Users wanting to test it can
opt-in on a build from main, although the CLI will obviously be incomplete
until the port is done.
We might need to prep parts of the branch before we could merge, as there are
changes to ref-guide that would be in limbo. So perhpas factor out the
ref-guide edits in its own PR that could be merged when we switch defaults?
I have not looked deeply yet, there could be other blockers. But if we have
come so far that we are confident this will happen, we could do this. A bit
like the new UI, which is already in even if it not yet feature complete.
> Use picocli instead of commons-cli
> ----------------------------------
>
> Key: SOLR-17697
> URL: https://issues.apache.org/jira/browse/SOLR-17697
> Project: Solr
> Issue Type: Improvement
> Components: cli
> Reporter: Jan Høydahl
> Assignee: Jan Høydahl
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10h 10m
> Remaining Estimate: 0h
>
> Apache commons-cli has served us well for years, but our CLI has out-grown
> its capabilities, with multiple sub commands and a plethora of options and
> arguments. We have much custom code to work around limitations.
> By embracing [Picocli|https://picocli.info/], an annotation based cli
> framework, it will be easier to maintain the cli and add further tools. We
> propose to target 10.1 and do work gradually in a feature branch.
> The feature branch is {{{}jira/SOLR-17697-picocli{}}}, you can view it in a
> [draft PR not intended for merge|https://github.com/apache/solr/pull/3254].
> That PR has a description on how to contribute, and a checklist of tools not
> yet converted. Once all tools are converted, all tests are green and all docs
> updated, we can merge this work.
> There is an env var {{SOLR_PICOCLI=true}} that we currently use to swtich
> from old commons-cli and new picocli. Once the feature branch is merged we
> can choose to make SOLR_PICOCLI default to true but retain the old
> commons-cli parser code for a few releases, so there will be a workaround for
> potential bugs.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]