Depending on and generating files in system definitions

Jan Moringen jmoringe at techfak.uni-bielefeld.de
Tue Jun 28 12:19:11 UTC 2016


Hi.

It seems to be a common pattern to maintain a project's version
information as a string in a separate file, e.g. version.sexp, and use
something like

    (:version (:read-file-form "version.sexp"))

to get that information into the system definition. This seems like a
good thing to do as long as version changes are rare and performed
manually. Unless there is a better way for this simple case, no
problems or questions so far.

There are, however, situations in which this doesn't work. My use-case
is a project which is maintained in a GIT repository and uses the
following versioning scheme

    MAJOR.MINOR.NUMBER-OF-COMMITS-SINCE-RELEASE

This is useful for things like bug reports or determining compatibility
of input files with the current version of the software. The crucial
part is maintaining NUMBER-OF-COMMITS-SINCE-RELEASE automatically.

Previously, I implemented this behavior using some horrible hacks that
I would rather not talk about. I started from scratch and came up with
a potential solution (detailed description attached).

Since this seems like a common problem, I would like to ask whether the
outlined approach is the proper way to do this. If so, I can try to
turn the description into something that could be added to the FAQ
section of the ASDF manual.

Thanks in advance and kind regards,
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: description.tar.gz
Type: application/x-compressed-tar
Size: 72158 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20160628/71199862/attachment-0001.bin>


More information about the asdf-devel mailing list