lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ancient convert rules


From: Jonas Hahnfeld
Subject: Re: ancient convert rules
Date: Sun, 30 Aug 2020 22:37:27 +0200
User-agent: Evolution 3.36.5

Am Sonntag, den 30.08.2020, 22:12 +0200 schrieb Jean Abou Samra:
> > What if we kept a legacy convert.ly that went from the origin to, say
> > 2.12.0 that was still Python 2 based?  And then had the new, Python 3-based
> > convert.ly start from 2.12.0?
> > 
> > This would provide a way for anybody who needed to get old source code up
> > to the current standard to do so, and would eliminate the burden of
> > converting the whole file to Python 3.
> > 
> > Thanks,
> > 
> > Carl
> 
> Maybe the solution is just to mention somewhere in the documentation of
> convert-ly that if the user wants to upgrade from older that 2.12 or 
> whatever, they can use the convert-ly from LilyPond 2.18?

If we want to maintain all old rules, I think it's better to have them
stay one script. Python 2 will hopefully go away at some point, if the
rules are needed they should be fixed.


> > I definitely overlooked how often there are*too many*  backslashes in
> > the code. So there are a lot more changes requried than what is in merge
> > request 363:
> 
> Also, you fixed invalid escape sequences -- thanks for that! --, but 
> pylint can't
> spot cases where there aren't many actual backslash characters in the 
> resulting string
> to escape backslashes in the regular expression (the second level of 
> escaping), like in Jonas'
> original example. This is why it seems all ancient rules would require a 
> decent
> amount of work to be made to work with Python 3, if I understand correctly.

I think it's not that bad, I went through 24 instances of this.
What's giving me more headaches right now is the rule for 2.5.13 to
remove \encoding. As far as I understand, it tries to re-encode the
whole file which won't work easily because the content is already read
in UTF-8 mode. As far as I understand, \encoding "latin1" basically
meant binary mode in LilyPond? I guess I have to look this up in git.

Jonas

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]