GNU bug report logs - #74993
[PATCH] guix: toml: Fix evaluation of empty inline tables.

Previous Next

Package: guix-patches;

Reported by: Lars-Dominik Braun <lars <at> 6xq.net>

Date: Fri, 20 Dec 2024 11:30:03 UTC

Severity: normal

Tags: patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74993 in the body.
You can then email your comments to 74993 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#74993; Package guix-patches. (Fri, 20 Dec 2024 11:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lars-Dominik Braun <lars <at> 6xq.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 20 Dec 2024 11:30:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] guix: toml: Fix evaluation of empty inline tables.
Date: Fri, 20 Dec 2024 12:29:32 +0100
* guix/build/toml.scm (eval-toml-file): Add pattern for empty inline table.
* tests/toml.scm ("parse-toml: Empty inline table"): New testcase.

Change-Id: I69663af2a861716acfb801fad4474e029e102a1b
---
 guix/build/toml.scm | 1 +
 tests/toml.scm      | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/guix/build/toml.scm b/guix/build/toml.scm
index 81b54fa5b7..a9be0887e7 100644
--- a/guix/build/toml.scm
+++ b/guix/build/toml.scm
@@ -414,6 +414,7 @@ (define (eval-toml-file parse-tree)
                                           local-time)
                                         tails)))
       ('array (list))
+      ('inline-table '())
       (('inline-table tails ...)
        (eval (keyword-flatten '(keyval) tails) '() '()))))
 
diff --git a/tests/toml.scm b/tests/toml.scm
index cd8e4d2338..64bc667f0c 100644
--- a/tests/toml.scm
+++ b/tests/toml.scm
@@ -396,6 +396,14 @@ (define-module (test-toml)
 point = { x = 1, y = 2 }
 animal = { type.name = \"pug\" }"))
 
+(test-equal "parse-toml: Empty inline table"
+ '(("name")
+   ("point")
+   ("animal"))
+ (parse-toml "name = {}
+point = { }
+animal = {    }"))
+
 (test-error "parse-toml: Invalid assignment to inline table"
  #t
  (parse-toml "[product]

base-commit: 946e48d1d87ec451e7a6315712f2e86c79961a51
-- 
2.45.2





Information forwarded to guix-patches <at> gnu.org:
bug#74993; Package guix-patches. (Wed, 25 Dec 2024 22:32:02 GMT) Full text and rfc822 format available.

Message #8 received at 74993 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Lars-Dominik Braun <lars <at> 6xq.net>
Cc: 74993 <at> debbugs.gnu.org
Subject: Re: [bug#74993] [PATCH] guix: toml: Fix evaluation of empty inline
 tables.
Date: Wed, 25 Dec 2024 23:31:35 +0100
Lars-Dominik Braun <lars <at> 6xq.net> skribis:

> * guix/build/toml.scm (eval-toml-file): Add pattern for empty inline table.
> * tests/toml.scm ("parse-toml: Empty inline table"): New testcase.
>
> Change-Id: I69663af2a861716acfb801fad4474e029e102a1b

LGTM!




Information forwarded to guix-patches <at> gnu.org:
bug#74993; Package guix-patches. (Thu, 26 Dec 2024 21:15:03 GMT) Full text and rfc822 format available.

Message #11 received at 74993 <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 74993 <at> debbugs.gnu.org
Subject: Re: [bug#74993] [PATCH] guix: toml: Fix evaluation of empty inline
 tables.
Date: Thu, 26 Dec 2024 22:14:03 +0100
Hi,

> LGTM!

thanks. Since pyproject-build-system depends on (guix build toml) this
is a world-rebuilding change. Can we piggyback this patch onto another
(possibly unrelated) world-rebuilding branch?

Lars





Information forwarded to guix-patches <at> gnu.org:
bug#74993; Package guix-patches. (Sat, 28 Dec 2024 17:25:01 GMT) Full text and rfc822 format available.

Message #14 received at 74993 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Lars-Dominik Braun <lars <at> 6xq.net>
Cc: 74993 <at> debbugs.gnu.org
Subject: Re: [bug#74993] [PATCH] guix: toml: Fix evaluation of empty inline
 tables.
Date: Sat, 28 Dec 2024 18:24:48 +0100
Hi,

Lars-Dominik Braun <lars <at> 6xq.net> skribis:

>> LGTM!
>
> thanks. Since pyproject-build-system depends on (guix build toml) this
> is a world-rebuilding change. Can we piggyback this patch onto another
> (possibly unrelated) world-rebuilding branch?

Oh, good point.  I guess this can go to the ‘python-team’ branch?

Ludo’.




Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Sun, 05 Jan 2025 12:54:02 GMT) Full text and rfc822 format available.

Notification sent to Lars-Dominik Braun <lars <at> 6xq.net>:
bug acknowledged by developer. (Sun, 05 Jan 2025 12:54:02 GMT) Full text and rfc822 format available.

Message #19 received at 74993-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 74993-done <at> debbugs.gnu.org
Cc: Lars-Dominik Braun <lars <at> 6xq.net>
Subject: [PATCH] guix: toml: Fix evaluation of empty inline tables.
Date: Sun, 05 Jan 2025 13:53:27 +0100
I've just pushed it to the python-team branch.

-- 
Ricardo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 03 Feb 2025 12:24:18 GMT) Full text and rfc822 format available.

This bug report was last modified 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.