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 else >>>> 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
--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))))))
--8<---------------cut here---------------end--------------->8---
and the new is
--8<---------------cut here---------------start------------->8---
(define-syntax test-group
(syntax-rules ()
((_ suite-name decl-or-expr ...)
(dynamic-wind
(λ () (test-begin name))
(λ () decl-or-expr ...)
(λ () (test-end name))))))
--8<---------------cut here---------------end--------------->8---
The specification basically just says that
--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))))
--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:
--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 ())
--8<---------------cut here---------------end--------------->8---
f9f6559de1fc2e64b5b55c451bac4c0557402d85:
--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 ())
--8<---------------cut here---------------end--------------->8---
I am curious what the difference is, I am missing something here.
Tomas
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
signature.asc
Description: PGP signature
