Re: [frogs] T1224: Avoid using deprecated %module-public-interface in guile initialisation. (issue1160044)

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]


This is a multi-part message in MIME format.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Han-Wen and all,
I can't upload the patch-set to Rietveld, and I seem to have lost
ownership of the issue on Reitveld, so I can't close it and open a new
issue either.

On 30/08/10 03:31, Han-Wen Nienhuys wrote:
> On Sat, Aug 28, 2010 at 4:16 PM, Ian Hulin <ian@xxxxxxxxxxxx> wrote:
>> (define (make-music-type-predicate . music-types)
>>  (define ((make-music-type-predicate-aux mtypes) expr)
>>    (if (null? mtypes)
>>        #f
>>        (or (eqv? (car mtypes) (ly:music-property expr 'name))
>>            ((make-music-type-predicate-aux (cdr mtypes)) expr))))
>>  (make-music-type-predicate-aux music-types))
>>
>> I'm a bit puzzled by this code.  Even if we move the nested definition
>> out from within make-music-predicate, how does it work?  Variable
>> make-music-type-predicate is not declared anywhere else, and yet here we
>> appear to ask guile to resolve and call it before it is declared and
>> bound to anything?
> 
> are you sure? I only see calls to the -aux helper.
> 
I'd forgotten about currying functions. Neil picked up about the need to
use a new module in 1.9.  I've found a way of conditionally using it if
we're running with guile V1.9+.

>> Trying this in guile V1.8.7 repl with a dummy for ly:music-property and
>> it will work as written, but in V1.9.11 it always fails with
>> ERROR: in procedure macro-expand:
>> ERROR: source expression failed to match any pattern in (define
>> ((make-music-type-predicate-aux mtypes) expr)  (if (null? mtypes) #f (or
>> (eqv? (car mtypes) (ly:music-property expr 'name))
>> ((make-music-type-predicate-aux (cdr mtypes)) expr))))
>>
>> V1.9.11 throws the error whether or not the repl is called with
>> - --no-auto-compile.  It also doesn't help to try and un-nest the inner
>> (define and declare it at top-level.
> 
> Where is the latest version of this patch?  I downloaded a version
> from rietveld which required the following patch to get to
> display-lily.scm
> 
Stray dots removed in attached path - along with handler in
ergonomic-simple-format.
> commit 57992da984aaf16d6161dc44e5d9f7cb290ac813
> Author: Han-Wen Nienhuys <hanwen@xxxxxxxxxxxx>
> Date:   Sun Aug 29 23:30:55 2010 -0300
> 
>     Remove stray dots.
> 
> diff --git a/scm/lily.scm b/scm/lily.scm
> index 0aa2ad4..f898962 100644
> --- a/scm/lily.scm
> +++ b/scm/lily.scm
> @@ -213,9 +213,9 @@ messages into errors.")
>    format)
> 
>  (define (simple-format-handler dest . rest)
> -    (if (string? dest)
> -        (apply fancy-format (cons #f (cons dest . rest)))
> -        (apply fancy-format (cons dest . rest))))
> +  (if (string? dest)
> +      (apply fancy-format (cons #f (cons dest rest)))
> +      (apply fancy-format (cons dest rest))))
> 

>> Patrick and Neil, do I have to fix all the compatibility problems in all
>> the scm files loaded by lily.scm in order to push what we have so far?
> 
> As long as the compile for 1.8 keeps working, I don't think it's a
> problem incrementally tackling 1.9  compatibility problems.
> 
Cheers,
Ian



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMfUHYAAoJEBqidDirZqASIM8IAIgvhpveVxuj4OpHEom4xSpX
xDe2zhrn575cC8dfg876RMET9Swa54q/6EAG2AxH9nSEynJOS5VEFMCzRrwkisfS
fFrpmguluydqZ6FDjc4q/Ia1h0GGiH0CHWSMRow2WhVILMQtBKBnQBhRkYfU265X
ZwTNINt4/alFnjhnO9oJv9qnbQbLWL15g6hwzRvOLBbrOVONeVMl3TQF/tbt00Po
DPngHhizsqguA7YkG8fgNaylo/5MbHphG+yLzkkkzm97I8DSlpvKhkfuGbSZU7p3
ILzp/yQjEZ7gqyuZY6uSyc8sbwSQN0HHq7zrBEchUI3fa8y51MvTvudKWy27c3U=
=cnFp
-----END PGP SIGNATURE-----






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/