Repository navigation
Compute the uncrustify version - #1069
Conversation
| endif() | ||
| set(PACKAGE_VERSION "${full_version}") | ||
| set(FULL_VERSION "undefined") | ||
| set(PACKAGE_VERSION "undefined") |
There was a problem hiding this comment.
I have looked at this, the make_version.py and git describe a bit more and come to the conclusion that this approach is problematic.
Something is going wrong when the else branch is triggered, and I personally would rather prefer to throw an error message there which aborts everything:
message(FATAL_ERROR "message to display" ...)FATAL_ERROR = CMake Error, stop processing and generation
than having someone out there with an undefined Uncrustify version.
Dropping the --long inside make_version.py` in:
git describe --long --always --dirtywould produce short version strings for tagged commits (releases) and long version strings on non tagged commits:
release: uncrustify-0.64
current: uncrustify-0.64-511-gde474b8c
I would prefer to always have this amount of minimal information. If we only need that, we maybe could drop the make_version.py file altogether, assuming that we don't need to also manage hg. As far as I am aware there is no official hg repository of Uncrustify, right?
Contrary to this idea (removing the make_version.py file) would be to do the version string processing entirely in that file. This would:
- get rid of the
#ifdef DEBUGchecks - create the possibility to add a
_dpostfix touncrustifyto differentiate between debug and non debug builds - allow to remove the
gprefix from the commit hash
(it is there to differentiate between different SCM systems, g = git)
release: uncrustify_d-0.64
current: uncrustify_d-0.64-511-de474b8c
There was a problem hiding this comment.
Thanks for the comment.
My idea is to get some more informations from the user who create an issue message
and join the file created by the -p option.
No description provided.