janhoy opened a new pull request, #4909:
URL: https://github.com/apache/solr/pull/4909
## Goal
Land the picocli scaffolding on `main` **now**, while only 8 of ~25 tools
are ported, so that further tool migrations can be PR'd against `main` directly
instead of accumulating on a long-lived feature branch that needs periodic
merges of hundreds of commits.
That is only acceptable if a release would show users no regression. The
picocli implementation is already opt-in and off by default, so at runtime that
is nearly true — but not quite. This PR closes the gaps.
## How this PR gets there
**Nothing changes for users by default.** `SolrCLI.main` gates on
`EnvUtils.getPropertyAsBool("solr.picocli", false)`, and nothing in `bin/solr`,
packaging or Docker sets it. Verified: the full BATS suite is 127/127 green on
the default implementation.
**The ref guide no longer documents options the shipped CLI doesn't
accept.** `solr-control-script-reference.adoc` is restored to exactly what is
on `main` (the command table, the per-command links and the migration-progress
tick marks are gone) plus one note pointing at the experimental implementation.
The 16 generated pages move behind a new hand-written `cli/index.adoc` that
says plainly what picocli is, how to enable it, which commands exist and where
it differs; every generated page carries a warning and a link back to the
default documentation. The deployment-guide nav gains one entry instead of
sixteen.
**`gradlew check` is no longer slower or less skippable.**
`checkCliDocsUpToDate` moved inside the `refguide.include` guard. And other
cleanups around generating CLI docs.
**One regression is repaired.** `bin/solr zk rm /` had started requiring a
reachable ZooKeeper before it would tell you that you can't delete the root
node.
**The picocli path now survives first contact.** Previously bare `bin/solr`
threw `ExecutionException`, only 3 of 16 commands accepted `--help`,
`create`/`delete` were the only ones exposing `-V`, `version` dropped its
`Server version:` line, and a zk sub-command typed without the `zk` prefix
reported an unknown command.
**Improved Tests** to check for things like required command options for all
sub commands. A new `integrationTestsPicocli` task runs the migrated commands'
BATS suites against picocli.
**Full deprecation** `@Deprecated` on the commons-cli `Tool` API is kept and
now carries real `@deprecated` javadoc; `ToolBase.callTool()` stays abstract so
a newly added tool must opt in or out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]