Re: \set Score.proportionalNotationDuration warning on LilyPond 2.25.23

Paolo Prete <[email protected]>
Newsgroups gmane.comp.gnu.lilypond.devel,gmane.comp.gnu.lilypond.general
Message-ID <CA+Xftr8EThkoTsgsOxbvUAguVQ+t7f1L0WjK4AgW6iwpjs+_ZA@mail.gmail.com>
On Sun, Feb 9, 2025 at 1:20 AM Valentin Petzel <[email protected]> wrote:
>
> Hello Saul,
>
> > I don't want to speak for Dan, but I believe the objective is to get user
> > code moved over to actually using exact rationals rather than moments for
> > these properties, not just to allow the use of exact rationals in addition
> > to moments.
>
> This is not what I talked about. My point is: A deprecated property you’d
> usually get when an interface has been considered as not optimal and is
> changed, but you give the user time to adjust, allowing the old interface to
> still be used. This is not what is happening here. Here a new interface is
> introduced (namely `proportionalNotationDurationAsMoment`) as deprecated
> property. Essentially this is telling the user: Here is a new feature, but you
> should not actually use it, because it has been considered bad and will be
> removed in a future release.
>

Hello Valentin,

I totally agree with you. And I add an observation: if an API is
deprecated, it should be clear to the user that it is actually
deprecated.
This is not the case. In fact, the raised warning says:

"warning: the property 'proportionalNotationDuration' must be of type
'non-negative exact rational or +inf.0', ignoring invalid value '#<Mom"

...while a proper warning to a deprecated function should be something like:
"X is deprecated and will be removed. Use Y instead"

Therefore, IMHO it appears like an API break.
I also highlight that it's the first time that I encountered something
like that since 2.19.84 (and I'm talking about code that uses the
LilyPond API extensively and intensively)

I hope this can be reviewed and fixed in future releases. Meanwhile, I
can only add your workaround to my code.

Cheers,
Paolo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.