Would it be reasonable to add a note in the output of `ant jar` reminding
users to regenerate autocomplete if needed?

I don't see any issues with your approach given:

If 4) is not done, then it will be failing the builds in CI with a
> clear message what a person should do to fix it (run the ant target
> and amend).


~Chris
Christopher Bradford



On Wed, Sep 16, 2026 at 6:51 AM Štefan Miklošovič <[email protected]>
wrote:

> Hey, I just want to run this through ML because that might be
> something people might be sensitive to.
>
> We would like to provide autocompletion shell scripts (1) for nodetool
> commands with parameters autocomplete etc. Since we are on Picocli it
> is easy to generate that.
>
> The workflow I suggest is this:
>
> 1) a developer develops and changes some command
> 2) ant jar
> 3) okay, the change looks good, we go to merge
> 4) ant check
> 5) ooops, it is missing (updated) autocomplete when I introduced or
> changed some parameters and it says I should execute it
> 6) ant gen-autocomplete & git commit amend
> 7) ant check
> 8) now it passes
> 9) push & merge
>
> If 4) is not done, then it will be failing the builds in CI with a
> clear message what a person should do to fix it (run the ant target
> and amend).
>
> Under _normal_ circumstances, when no nodetool code is touched, there
> is no reason to run this command whatsoever. It is only specifically
> when a nodetool command is added or changed that this needs to be
> updated.
>
> We think that it is not a good idea to hook the autocompletion script
> generation directly into "ant jar" as it is not a good idea to hook
> anything new there. "ant jar" should be just building a JAR and
> _that's it_. It would create unnecessary pollution in the git stage
> area everytime I do "ant jar" and I would see some generated stuff
> there. However when a developer is fully done with a patch changing
> some commands and their parameters etc. then they will also update
> autocompletion commands at the end.
>
> Is this fine for people?
>
> Regards
>
> (1) https://github.com/apache/cassandra/pull/5127
>

Reply via email to