From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iDeCE+AT4mKgSAAAbAwnHQ (envelope-from ) for ; Thu, 28 Jul 2022 06:43:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UG+cEuAT4mLuiwAAG6o9tA (envelope-from ) for ; Thu, 28 Jul 2022 06:43:12 +0200 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 56C951FE3A for ; Thu, 28 Jul 2022 06:43:11 +0200 (CEST) Received: from localhost ([::1]:47814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGvMc-00076g-5S for larch@yhetil.org; Thu, 28 Jul 2022 00:43:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGvMU-00076X-SG for bug-guix@gnu.org; Thu, 28 Jul 2022 00:43:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39377) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGvMU-0003A6-Ir for bug-guix@gnu.org; Thu, 28 Jul 2022 00:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGvMU-0006Zp-At for bug-guix@gnu.org; Thu, 28 Jul 2022 00:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#56799: [PATCH v3] gexp: Handle *unspecified* as a gexp input. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 28 Jul 2022 04:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56799 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 56799@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 56799-submit@debbugs.gnu.org id=B56799.165898332525205 (code B ref 56799); Thu, 28 Jul 2022 04:43:02 +0000 Received: (at 56799) by debbugs.gnu.org; 28 Jul 2022 04:42:05 +0000 Received: from localhost ([127.0.0.1]:57359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGvLX-0006YR-Ch for submit@debbugs.gnu.org; Thu, 28 Jul 2022 00:42:05 -0400 Received: from mail-qv1-f53.google.com ([209.85.219.53]:46622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGvLR-0006Xt-R0 for 56799@debbugs.gnu.org; Thu, 28 Jul 2022 00:42:01 -0400 Received: by mail-qv1-f53.google.com with SMTP id x8so647256qvo.13 for <56799@debbugs.gnu.org>; Wed, 27 Jul 2022 21:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jVmR1vk8sDS5YtHz1jrfRiEhefQlwkHZIztFhRC9y54=; b=I/7FfBId79jaT89ZFgbJIjL4vVOl61/qJV83mHtlWNEK548kq8lO/iSo1KKzAC/+dN 0fkmnAAc/67KsoRigNYxhWJkG2lrEyOj+FS/AWZEDYY/uU10NfB2dH11zyYJa2ct29Gz nT5dG7ts0/NWH5Xhw3GUW1LUlzy7FBsC7Oj8q8ZoJ4UDlB/SCHbrBmJnv0Ywk4RirTfm PdlnVNOwyKoMhYt3qdUry0uTgWB1nuSIwpX/qHZoTZRal6ZZdaa/7lpXYiOT6rnSHSqa EzVxmTNBMXwi+NYeXP6q3Y1Cz0oNGz/wBuv+uRNsJmPN8RHQPFRmXWR2XE5omLvhNR0W SPGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jVmR1vk8sDS5YtHz1jrfRiEhefQlwkHZIztFhRC9y54=; b=fNSqGVWmxxQZ2TlmRBBaQ5DbtKBf+72/C15XCPJ/qAM19dmy0ZthyQbBqPWn0zQU9m AwnfuCcXsSki/hZoiihcJCBWqlgbUgQT1g+/QT2Ft+yrDzuM0rVtjlFEOYEbd030sq2B XdKt6ZBxTLLBrVLnq69MoUawxg0D4HZFRkxwDFfnQ33HpPOy9nJCqQietlAKQFZWaSv9 boSac7OPUXH+uJEamXyJdWOvnvb4qXzfHyK9x2QTGM/e7l36x96+JlOaUi+dkZJqpWXM KmmHFGzmFN9H3k1ypA1FixD3/QBSRbFx+JSibSUyiicFtPp4ROXn9+vmbti4HdVFjTVt MH3w== X-Gm-Message-State: AJIora9dKYeXtamhFvgaxja9gsc3ca8E0EEVCdeahg9KBHp30vTkO/bg H87U6TtoNFmcDiu3M9sYHlQWOXRlBkU= X-Google-Smtp-Source: AGRyM1uQ2p2LTZQI0ww+Bi3QPEStA7pPOFz7lLwrm6rkRgc7apH0Ev/zmLy1hdxPctYp4hGrO27MAg== X-Received: by 2002:a05:6214:3010:b0:473:626a:5526 with SMTP id ke16-20020a056214301000b00473626a5526mr22076426qvb.1.1658983311997; Wed, 27 Jul 2022 21:41:51 -0700 (PDT) Received: from localhost.localdomain (dsl-10-148-58.b2b2c.ca. [72.10.148.58]) by smtp.gmail.com with ESMTPSA id y8-20020a05620a44c800b006b5c5987ff2sm15761784qkp.96.2022.07.27.21.41.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 21:41:51 -0700 (PDT) From: Maxim Cournoyer Date: Thu, 28 Jul 2022 00:41:44 -0400 Message-Id: <20220728044144.15693-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <877d3y8hjj.fsf@gmail.com> References: <877d3y8hjj.fsf@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658983392; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=jVmR1vk8sDS5YtHz1jrfRiEhefQlwkHZIztFhRC9y54=; b=o+3bE72deb8dpaDhVJfZN/qMoJ+ERUt6uNrG7PuFM7F4SWLJOQ1pmom9F+IrwW55SAkzGL mYk68osXtl47X/5dIfCBee2NdvSXVgQBoi2Z8NWSYCHMaI6ii2sREsYnrNJr5j1Lgy26sH jgcDehzAWSeUkgMxXnugHj2RVkd49JlOJyZ9SnKJdxhx3CB6eCPqrYsAQ66o5DlZlshuuI VqTgsDIWgvQUN7thUXuF7vMAObfrPH7zDci5IGCp97U13L7oeIuRLo9YTlp9sXdmnD3YH1 /D1OlemFH4Ayo4CNQy5iawzvLsUNq/5oWdZJ9ilfR3dqGn2EMjX4U7ysN/nwEA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658983392; a=rsa-sha256; cv=none; b=SiJFhtrw4mPNVZGuIL83vp+UwE1sw7K1iiWD/dllnegjYnoymOr8kFzN8YFw1mvZITk2o3 FX9Y218Z91qoYym7qTCU+xeNwg3SohZWdT+gAsrA7o1pdTS333whE6kThIq8NkJhj9voCT WB1Uvp3sRBmWI7XQELLQdsrzz5M3o/up4yDR63awMuqtfFIIoz3LB+g5xzxYIinAoTYwuT N7AUDRZIdRF5vxkhYoNZvZtvXqFmv/7bukQ+yRanxEjECU7y8IY7uGsCFNa/6/BKFTu0IK A0PqDRz4H1XM1p0/eO9WvmTDIkp/H20sG9KKTVkCGfnRaSgvKJFCFPaZLQ7PBg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="I/7FfBId"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.27 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="I/7FfBId"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 56C951FE3A X-Spam-Score: 5.27 X-Migadu-Scanner: scn0.migadu.com X-TUID: zzNSvODzRDSE Fixes . * guix/gexp.scm (gexp->sexp)[*unspecified*]: Quote value when encountering it. --- guix/gexp.scm | 2 ++ tests/gexp.scm | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/guix/gexp.scm b/guix/gexp.scm index ef92223048..fe47a116f6 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -1380,6 +1380,8 @@ (define* (reference->sexp ref #:optional native?) #:output output))) (($ (? self-quoting? x)) (return x)) + (($ (? unspecified?)) + (return '*unspecified*)) (($ x) (raise (condition (&gexp-input-error (input x))))) (x diff --git a/tests/gexp.scm b/tests/gexp.scm index 07e940ffdc..cad139fde7 100644 --- a/tests/gexp.scm +++ b/tests/gexp.scm @@ -1128,6 +1128,12 @@ (define (matching-input drv output) (run-with-store %store (lower-gexp #~(foo #$+))))) +(test-equal "lower-gexp, *unspecified* input" + '(*unspecified*) + (lowered-gexp-sexp + (run-with-store %store + (lower-gexp #~(#$*unspecified*))))) + (test-equal "lower-gexp, character literal" '(#\+) (lowered-gexp-sexp -- 2.36.1