From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id uGLPJFhVZWevpwAAe85BDQ:P1 (envelope-from ) for ; Fri, 20 Dec 2024 11:30:32 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id uGLPJFhVZWevpwAAe85BDQ (envelope-from ) for ; Fri, 20 Dec 2024 12:30:32 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=nhCxfIV+; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=iLghc8Cv; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=6xq.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734694232; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=DvakTHMVkHDdZA0ezy+GELedGZnGeTV4NB6GKKeFuTk=; b=q05WviETM/bOWAQIYV7p56AbbjRi+RR/CTsaqvaKWho+pVFXkiuurelZ145UKsae3Ng9PC 87UonUmqGp9wxdtEN59rdv4gM3xPCI4Jb+2rbMe1eZrbH0/Rl9OCLnb7rrN1JJ0+2BNjUv mEciV63kV6097H0NiaO2rUV9mKyATIj2LKnPqWvK2VRW5xKhfp3wwKVNVXf+BTZTxEwhZj P2EiojeI1u1qHUy/zgKEceN2EsztsyLucjL9Bed/Ux5cec744PsMxxvgOpPIWSHyUm6hQb sSt+Tx87QZ8sSp8HkwC70womq48d24jGPbeodsp/p8rLL+FS9zlLC3rrivyWLw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=nhCxfIV+; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=iLghc8Cv; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=6xq.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734694232; a=rsa-sha256; cv=none; b=QukbbqwnjhRdcsHEc8alZlT7ACp4JmIlrLAEcYtunZ+oncV8sC2OBTQfNQYp/CNBNJYqkV X6X9Yg1SRDlE52vf1kKWV+h+SL0mwGavSs3ojkuwQ6lKKTqWistXIVS/0jzbN5jypDX6ri hh/St+Lsnt0N4kzUxE2v6R8pw2ArfWjSVKfcxZlruyt4UJAHmrobP/VlxYkwMpbIDUZVqr l+7IUIKLArvLprOBS9L7QqoyNwkhO1e5ugWRY1ZUBo41/FM/qJX0o5UKqDDdWrA6ortFb1 i/d766WhFLxWJy1YrDfCVEcxlou7Xfvn7ymHC9hIfDEffFGqC3l4w8qjwftV5g== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3F87F19D1B for ; Fri, 20 Dec 2024 12:30:32 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tObCo-0005t1-VR; Fri, 20 Dec 2024 06:30:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tObCm-0005sN-BH for guix-patches@gnu.org; Fri, 20 Dec 2024 06:30:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tObCm-0003Bd-2D for guix-patches@gnu.org; Fri, 20 Dec 2024 06:30:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:From:Date:To:Subject; bh=DvakTHMVkHDdZA0ezy+GELedGZnGeTV4NB6GKKeFuTk=; b=nhCxfIV+dx3rTKmk4ezLRd2y9tBeTpvrzGOG+nSt1fgz3ADMf4imkPH024efuaBmA2Lp1Vv3XA/h7QPUSK74blorE5WywVhN5cu03nHGkXT7upApWhvNd6LvFSr+YOuwq2x3frwawsefC3FI98c8yLaTghEh3CfHBeNu/DRVhWi0P+lUsLK5ULSHzLTKm6cK37ZEZhhebPyturbNxht1fzs/ezIoOveIwYqIY69pciu21Rgmmix8lDs8yFKWjqmNGrjXs1SZyk2mOVq7lioD92xeHV7cfnoVRprw41JDSAhmrn7+IZepiBceIjU5lOvbrQPohDXl5s6GuqSvrN7xdw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tObCl-0003Gf-CB for guix-patches@gnu.org; Fri, 20 Dec 2024 06:30:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74993] [PATCH] guix: toml: Fix evaluation of empty inline tables. Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 20 Dec 2024 11:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74993 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74993@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.173469419212509 (code B ref -1); Fri, 20 Dec 2024 11:30:03 +0000 Received: (at submit) by debbugs.gnu.org; 20 Dec 2024 11:29:52 +0000 Received: from localhost ([127.0.0.1]:41872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tObCZ-0003Fh-SW for submit@debbugs.gnu.org; Fri, 20 Dec 2024 06:29:52 -0500 Received: from lists.gnu.org ([209.51.188.17]:35930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tObCU-0003FU-IC for submit@debbugs.gnu.org; Fri, 20 Dec 2024 06:29:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tObCT-0005qE-V8 for guix-patches@gnu.org; Fri, 20 Dec 2024 06:29:46 -0500 Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1tObCS-00031e-5J for guix-patches@gnu.org; Fri, 20 Dec 2024 06:29:45 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4YF4vL2kVlz9t7b for ; Fri, 20 Dec 2024 12:29:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1734694174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=DvakTHMVkHDdZA0ezy+GELedGZnGeTV4NB6GKKeFuTk=; b=iLghc8Cv7iFEDL9Q79EOPwydoPXajBA3FUMtagVuwQ32VdyLvfznBDCgjXeFstaECZEr6U rPySP5fetsvW5GpzEdG8al9pNUF6ykE9+bxp5V3AbWUzBtuwbdk1uETa1T2vQeB5IptwTF /hk31hGDfMwYj+GIgO7V30o2Tk793ZmCTig1xtmFD2bXoHf2mOSipq6AnyQ6N7EVKAKaqH hcUpjfVVD4WGEaz9ZP5p0UrTTMk4vlbXwZio87f9VZngeq7aJkU3mgNjhSrbMhxI6upN1m H+LoZYaa4wLRqbXnPMym8EpQtvrnME6x/i1vdyUfjofdYdHCMhzhf4ZSvy57Dw== Date: Fri, 20 Dec 2024 12:29:32 +0100 From: Lars-Dominik Braun Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 4YF4vL2kVlz9t7b Received-SPF: pass client-ip=2001:67c:2050:0:465::202; envelope-from=lars@6xq.net; helo=mout-p-202.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -3.09 X-Spam-Score: -3.09 X-Migadu-Queue-Id: 3F87F19D1B X-TUID: AxwkabzL0qJu * 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