private ly:version?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

private ly:version?

Jan-Peter Voigt
Hi all,

I now have a use case for ly:version? documented in
http://lilypond.org/doc/v2.21/Documentation/usage/writing-code-to-support-multiple-versions

But the function is module-private in lily. The example on that page
does not compile and so doesn't any external file.

I can work around it with
#(define ly:version? (@@ (lily) ly:version?))

But I guess that is not intended?
I might change the define to define-public in 'scm/lily-library.scm'?

Jan-Peter


Reply | Threaded
Open this post in threaded view
|

Re: private ly:version?

Jean ABOU SAMRA

Le 24/09/2020 à 16:05, Jan-Peter Voigt a écrit :

> Hi all,
>
> I now have a use case for ly:version? documented in
> http://lilypond.org/doc/v2.21/Documentation/usage/writing-code-to-support-multiple-versions
>
> But the function is module-private in lily. The example on that page
> does not compile and so doesn't any external file.
>
> I can work around it with
> #(define ly:version? (@@ (lily) ly:version?))
>
> But I guess that is not intended?
> I might change the define to define-public in 'scm/lily-library.scm'?
>
> Jan-Peter

See https://gitlab.com/lilypond/lilypond/-/issues/5517

Naturally, patches are always welcome!

I'm not quite sure how to properly ensure a condition
is true in a regression test. Maybe just

#(if (not (ly:version? = (ly:version)))
    (ly:message "WARNING: ly:version? broken!"))

Best,
Jean


Reply | Threaded
Open this post in threaded view
|

Re: private ly:version?

Jean ABOU SAMRA
Le 25/09/2020 à 13:40, Jean Abou Samra a écrit :

> See https://gitlab.com/lilypond/lilypond/-/issues/5517
>
> Naturally, patches are always welcome!
>
Obviously I had not realized that you have been a contributor in the past.

Cheers,
Jean