Add lilypond version predicates/operators
This set of predicates/operators compares a given reference version
to the LilyPond version that is currently being executed.
This makes it possible to implement "version switches" to write
(library) code that is compatible over syntax changes.
NOTE: I'm not sure where (and if) this should be documented.
Please make suggestions
Some example code for the feature:
Of course this will not actually work with older versions because they
don't have the functions
built in. But it serves to demonstrate the use case for future syntax
changes
Am 10.02.2017 um 09:04 schrieb Urs Liska:
--
ul@openlilylib.org
https://openlilylib.org
http://lilypondblog.org
Related
Issues:
#5067Last edit: Urs Liska 2017-02-10
Diff:
Passes, make make check and a full make doc.
Patch on countdown for February 17th.
Reflect discussions.
http://codereview.appspot.com/317270043
Stub for trying out the functions:
#(format #t ">: ~a\n" (version-compare? '(2 19 5) = '(2 18 0)))
It should work with all combinations of operators and combinations of
list lengths
Last edit: Urs Liska 2017-02-14
Passes make, make check and a full make doc.
Lexicographic comparison and ly:version? wrapper
http://codereview.appspot.com/317270043
Test code for latest patch set:
Passes make, make check and a full make doc.
Patch on countdown for February 20th.
Rename secondary function after discussion
http://codereview.appspot.com/317270043
Fix omission of previous patch set
http://codereview.appspot.com/317270043
passes make, make check and a full make doc.
Leaving this on review, David has some comment in Rietveld.
Am 2017-02-20 14:30, schrieb pkx166h:
This is not necessary. David's last comments crossed with my patch set 4
where I took back my doubts about the naming. In fact I had renamed the
function to David's original suggestion.
Limit ly:version? to number list (as suggested by Paul)
http://codereview.appspot.com/317270043
Passes make, make check and a full make doc.