Lukas-Fabian Moser <l...@gmx.de> writes: > Hi David, >>> Ok, so then I remain unclear as to why the original code seemingly >>> worked with 2.12. But at the end of the day, I don't care that much: >>> 'translation-type it is then, for what should be a \set'table context >>> property. >> I repeat: >> >>>> the change flagging the preexisting problem may possibly be >>>> >>>> commit e44bc2cc48f9fb714603bdb5f8db532d55374087 >>>> Author: Neil Puttock <n.putt...@gmail.com> >>>> Date: Thu Apr 30 20:29:09 2009 +0100 >>>> >>>> Add type-checking to \tweak. >>>> >>>> in version 2.13.1 > > Sorry for being thick - the use of the word \tweak confused me.
Well, there has been an increasing tendency of enforcing the type system over the years, starting with warnings and ending with flat-out refusals to assign bad values. I have not looked at the actual commit itself here but just looked for a few pickaxe strings (git log -S ...) and log messages (git log --grep ...). So it might or might not have been that exact commit. > I do not have the old development versions available, so my manual > bisecting is very much on the coarse side. But I can confirm that: > > For the following (WRONG!) definition of a context property > > #(set-object-property! 'myprop 'backend-type? integer?) > #(set-object-property! 'myprop 'backend-doc "test property") > > (A) LilyPond 2.12.3 complains about \set Staff.myprop = 42 but > executes it (the property can be retrieved afterwards). > (B) LilyPond 2.12.3 does NOT complain about > \context Staff { > \applyContext > #(lambda (ctx) > (ly:context-set-property! ctx 'myprop 84)) > } > (and executes it). > > LilyPond 2.14.0 still behaves like 2.12.3 > > LilyPond 2.14.2 complains about (A) and (B), but executes the > assignments nevertheless. > > LilyPond 2.16.2 still behaves like 2.14.2 > > LilyPond 2.18.0 complains about (A) and (B) and refuses to execute the > assignments. > > And of course, using a correct definition (using 'translation-type?), > nothing changes between 2.12.3 and 2.22.0. That would be roughly in line with my overall expectations. -- David Kastrup