Re: GNU Guile 3.0.11 released

Tomas Volf <[email protected]> Sun, 14 Dec 2025 22:26:13 +0100
Newsgroups gmane.lisp.guile.devel
Message-ID <[email protected]>
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Rob Browning <[email protected]> writes:

> Greg Troxel <[email protected]> writes:
>
>> "Dr. Arne Babenhauserheide" <[email protected]> writes:
>>
>>> Greg Troxel <[email protected]> writes:
>>>
>>>> tl:dr: gnucash is not happy with new guile, and I wonder if anybody el=
se
>>>> is seeing this.  I realize this is perhaps a latent bug in gnucash.
>>>
>>> Can you give instructions for reproducing this?
>>
>> What I did is:
>>
>>   NetBSD 10 amd64
>>   all packages built from pkgsrc-current
>>   locally update lang/guile30 from 3.0.10 to 3.0.11, and install it
>>   try to build finance/gnucash (5.13)
>>
>> with 3.0.11 installed, I get the error I included.   With 3.0.10
>> installed, and nothing else changed, it builds and starts.
>
> I think Matt Wette figured this out.  The crash appears to be caused by
> a change in our overhauled SRFI-64 that expands test-group forms
> without a body differently, e.g.:
>
>   (test-group "some-group")
>
> I'm not entirely certain what the spec requires, but depending, I assume
> we should either make that an error with a suitable message, or change
> the definition to handle it.

So, trimming some extra code around it, the old version is

=2D-8<---------------cut here---------------start------------->8---
(define-syntax test-group
  (syntax-rules ()
    ((test-group suite-name . body)
       (dynamic-wind
         (lambda () (test-begin suite-name))
         (lambda () . body)
         (lambda () (test-end  suite-name))))))
=2D-8<---------------cut here---------------end--------------->8---

and the new is

=2D-8<---------------cut here---------------start------------->8---
(define-syntax test-group
  (syntax-rules ()
    ((_ suite-name decl-or-expr ...)
       (dynamic-wind
         (=CE=BB () (test-begin name))
         (=CE=BB () decl-or-expr ...)
         (=CE=BB () (test-end   name))))))
=2D-8<---------------cut here---------------end--------------->8---

The specification basically just says that

=2D-8<---------------cut here---------------start------------->8---
(test-group suite-name decl-or-expr ...)

Equivalent to:

(if (not (test-to-skip% suite-name))
  (dynamic-wind
    (lambda () (test-begin suite-name))
    (lambda () decl-or-expr ...)
    (lambda () (test-end suite-name))))
=2D-8<---------------cut here---------------end--------------->8---

There is little extra code, to handle needs the spec did not think of,
but that should not really affect much.  I do not know enough Guile to
be able to tell what the effective difference between `decl-or-expr ...'
and `. body' is, but in practice they seem to behave the same.

3.0.9:

=2D-8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use (srfi srfi-64)
scheme@(guile-user)> (test-group "some-group")
While compiling expression:
Syntax error:
unknown location: lambda: bad lambda in form (lambda ())
=2D-8<---------------cut here---------------end--------------->8---

f9f6559de1fc2e64b5b55c451bac4c0557402d85:

=2D-8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use (srfi srfi-64)
scheme@(guile-user)> (test-group "some-group")
While compiling expression:
Syntax error:
unknown location: lambda: bad lambda in form (lambda ())
=2D-8<---------------cut here---------------end--------------->8---

I am curious what the difference is, I am missing something here.

Tomas

=2D-=20
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmk/K3UOHH5Ad29sZnNk
ZW4uY3oACgkQL7/ufbZ/walMMg/+K4ZFs+lrY2E/P5f20oH+OmIbRtILmEsaG4AS
KUr8N/SjIDnEhgjl+I66FwlDZMR9x07AaaRE/TSFlnyXdAtqYmYdTLffjFh+X7xm
gJRBM1Js2C4X1qJWAtSSzL/izQx2SrbHElK0FEfsM96B2eV3axsMHG27/Bhw+RKD
oPnI6VkgenYI0vi5vGkNkk+vDkm28qsQ8E+j21MEUbr2lO/QFJkiYuqEDmSRLgUI
dG91chuF3hkzgbvg/DQQWg+CIYr10iNwwTD8vnHZ7Gt9jEuFjMg0kiN8ir/53HOx
0D0BE1EFRg7Lycy9AEURGHRAoejzid6mafYvw/OJNqHA4M1r4TYcRlwOL8G/uInH
+xd52pWNIWUgozFpC200EJpa66qVzScyFoY4qcmifntHFlsSITtzEOmnsYoFLeLf
2Wp3Mio+KQTEYQj7xbedgxO1y8F1nYsvMaMkvnPYGMscwfXxUmkRVC10c5a8L8SR
uma226DPP+34P3+SGzJLMNNlL0El/YQef1iTpxMxtgT6VGD5NFQ+NZngWpLlTZAT
yGxHjZXbdv8zsrPYKqu8qBVOnBj68zueLUpbUH/P+Fb1Un7JbH9kbMR01HCcZt8g
jR8Eju03bYcI5qG6IWKSVL1wirxsuNdU3ngH+i+7isqNUFpWog7nMeF8ExpY6PdS
7gGaX70=
=A5G5
-----END PGP SIGNATURE-----
--=-=-=--