Jonas Hahnfeld <hah...@hahnjo.de> writes: > For https://gitlab.com/lilypond/lilypond/-/issues/6024, I've been > looking at python/convertrules.py and wonder if we really need all > ancient rules starting from version 0.1.9. Right now, a majority of > these won't even apply because Python 3 is much pickier about bad > escape codes in the regular expressions. Example: > re.sub('\\musicalpitch', '\\pitch', s) > is wrong because \\ only escapes for the string and neither \m nor \p > are correct escapes in a regular expression. For this case, it's easy > to fix with raw strings and I think I was able to resolve most errors > so that all rules are able to run, but I've no way to guarantee that my > edits are correct. > > To make the story short: Can we maybe instead drop any rules older than > 2.12.0? Its last minor release 2.12.3 is more than 10 years ago.
Music tends to stick around really really long once entered. Admittedly old convert-ly rules tended to be a lot less thorough than what we tend to do now. Doing dak@lola:/usr/local/tmp/The-Mutopia-Project$ git grep -h '\\version'|sort -u|less gives me something starting with \version "1.9.8" \version "2.10" \version "2.10" \version "2.10.0" \version "2.10.0" \version "2.10.0" \version "2.10.10" %\version "2.10.10" \version "2.10.10" \version "2.10.12" \version "2.10.14" \version "2.10.14" and also containing \version "2.2.0" \version "2.4.0" \version "2.4.1" \version "2.4.2" \version "2.4.2" \version "2.4.6" \version "2.5.21" \version "2.6.0" \version "2.6.0" \version "2.6.0" \version "2.6.2" \version "2.6.3" \version "2.6.3" \version "2.6.3" % necessary for upgrading to future LilyPond versions. \version "2.6.4" \version "2.6.4" \version "2.6.4" and so on. Stuff like that will not likely convert nicely, but at least having a start seems like common courtesy. -- David Kastrup