[website] script generating POT files broken with guile@3.0.7

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Prikler
  • pelzflorian (Florian Pelz)
Owner
unassigned
Submitted by
pelzflorian (Florian Pelz)
Severity
normal

Debbugs page

pelzflorian (Florian Pelz) wrote 4 years ago
(address . bug-guix@gnu.org)
20210806105344.quuluhdqx3aa4jpv@pelzflorian.localdomain
Hello Guix!

In the guix-artwork.git repo, the pot file generation
(scripts/sexp-xgettext.scm as described in the file i18n-howto) in the
website is broken since guile@3.0.7. Old guile@3.0.2 works.

The issue is at the end of the procedure in the call to (read) within
token->string-symbol-or-keyw, specifically

guile -c '(with-input-from-string ",@" (lambda () (read)))'

I will investigate, but I don’t fully understand.

Regards,
Florian
Leo Prikler wrote 4 years ago
(address . 49910@debbugs.gnu.org)
286d211b3e7371e456de86219575580f20887955.camel@student.tugraz.at
Misremembered the bug ID, sorry
Message-ID: <bacb41f441ccb34c733ff66fcd5f73e8efdcf68e.camel@student.tugraz.at>
Subject: Re: [website] script generating POT files broken with guile@3.0.7
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>,
49010@debbugs.gnu.org
Date: Fri, 06 Aug 2021 14:02:03 +0200
In-Reply-To: <20210806105344.quuluhdqx3aa4jpv@pelzflorian.localdomain>
References: <20210806105344.quuluhdqx3aa4jpv@pelzflorian.localdomain>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.34.2
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable

Hi Florian,

Am Freitag, den 06.08.2021, 12:53 +0200 schrieb pelzflorian (Florian
Pelz):
Toggle quote (12 lines)
> Hello Guix!
>=20
> In the guix-artwork.git repo, the pot file generation
> (scripts/sexp-xgettext.scm as described in the file i18n-howto) in
> the website is broken since guile@3.0.7. Old guile@3.0.2 works.
>=20
> The issue is at the end of the procedure in the call to (read) within
> token->string-symbol-or-keyw, specifically
>=20
> guile -c '(with-input-from-string ",@" (lambda () (read)))'
>=20
> I will investigate, but I don=E2=80=99t fully understand.
Having written a Scheme-specific xgettext implementation myself, I
think the issue here is that guile@3.0.7 returns syntax objects from
(read), whereas previous guile does not.

The trick that I'm applying is to call syntax->datum on the return
value of (read). In older guile, this does nothing, whereas in newer
guile it returns the symbol, keyword, list... whatever (read) would
have returned in the old implementation.

I hope this works out for you the way it did for me.

Cheers!


pelzflorian (Florian Pelz) wrote 4 years ago
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 49910@debbugs.gnu.org)
20210807110809.z2vx2rydsbwphke6@pelzflorian.localdomain
On Fri, Aug 06, 2021 at 02:16:16PM +0200, Leo Prikler wrote:
Toggle quote (4 lines)
> > guile -c '(with-input-from-string ",@" (lambda () (read)))'
> The trick that I'm applying is to call syntax->datum on the return
> value of (read).

This must be a different error because guile errors out without return
value, but thank you for making me read the guile NEWS file again. I
had forgotten there was a rewrite of (read).

I have pushed a workaround to guix-artwork as
f66b87373b33974751d2567f8c433ce44d07f10a and will take another look at
guile’s behavior now.

Regards,
Florian
pelzflorian (Florian Pelz) wrote 4 years ago
(address . 49910-done@debbugs.gnu.org)
20210818102117.xqv2dmejyls6272i@pelzflorian.localdomain
I’m closing this issue since a workaround is in place.

The current behavior of the website’s sexp-xgettext script is wrong
(and was wrong before with guile@3.0.2) when passing --keyword=quote
or --keyword=unquote-splicing but nobody does that anyway.

The script should be adapted with further development of (ice-9 read),
for example if comment parsing gets added[0], the PEG parser in
sexp-xgettext can be thrown away.


Regards,
Florian
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 49910@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 49910
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help