On Wed, Sep 16, 2026 at 6:01 PM Mick <[email protected]> wrote: > > Any reason we want to be keeping generated files under version control ? >
Because that is something we are going to package in Debian deb and ship so it is installed in /usr/share/bash-completion/completions/nodetool. Also, people who do not use the deb package should also benefit from this so I think it should be placed into the tarball as well. Do you want to generate this only when deb and tar.gz are produced? (e.g. upon ant artifacts) > I would think the cleaner way to do this is make gen-autocomplete detect > when it doesn't need to run (i.e. nodetool-completion exists, and with a > newer timestamp that any of the nodetool classes). That limits it to only 5 > steps instead of the potential 9. The fact that we changed some nodetool-related classes does not mean that autocompletion scripts have changed. We can modify nodetool classes without actually changing any parameters and / or adding commands. We would run this unnecessarily in these cases. I think we are trying to be too smart here about that. What I like about the proposed workflow is that it is explicit. I would be personally not satisfied if the build process is generating some stuff without me explicitly wanting that. I do not want to run "ant jar" and then some files suddenly appear in my git staging area. It is just clutter. I hope that at this point everybody uses "ant check" when they are serious about the shipment of the patch they completed and that is the time when this would be detected. > > > > On Wed, 16 Sep 2026, at 12:51 PM, Štefan Miklošovič 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
