Colvars / colvars

Collective variables library for molecular simulation and analysis programs
http://colvars.github.io/
GNU Lesser General Public License v3.0
196 stars 56 forks source link

Track patch version #681

Closed giacomofiorin closed 2 months ago

giacomofiorin commented 3 months ago

Adds a patch version (which is zero in the main branch) to identify versions of the Colvars code where only bugfixes are added, for inclusion in patch releases of other packages.

Solves #671

jhenin commented 3 months ago

Looks good to me in general. How will version_int be set and used?

giacomofiorin commented 2 months ago

Looks good to me in general. How will version_int be set and used?

I think that the simplest approach would be setting it to the same number as the patch version of the MD engine. E.g. for the code that will go into the upcoming GROMACS 2024.2 patch release, we can set it directly to 2?

As for when/how to use it, the only meaningful use case that I see now is printing it at startup, to clarify which bugs may affect (or not) a certain run. As for tracking features (big and small) we probably have enough resolution already with the current version string, do we not?

jhenin commented 2 months ago

I see. Wouldn't it be cleaner to have all of these gathered in colvars_version.h, instead of touching a file like colvarmodule.h?

giacomofiorin commented 2 months ago

I see. Wouldn't it be cleaner to have all of these gathered in colvars_version.h, instead of touching a file like colvarmodule.h?

Yup, that would be cleaner indeed. However, it would also interfere with how the functions in devel-tools/version_functions.sh operate to automatically set the version strings. Given that the new integer flag would never be changed in the master branch, it didn't seem worth the extra effort to me.

Of course, I'm totally okay if you feel strongly about this and decide to go ahead and change version_functions.sh to play nicely with the patch version.