From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iNeLFKkVvGHneQEAgWs5BA (envelope-from ) for ; Fri, 17 Dec 2021 05:44:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cANKEKkVvGEeRwAA1q6Kng (envelope-from ) for ; Fri, 17 Dec 2021 04:44:25 +0000 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 171453780D for ; Fri, 17 Dec 2021 05:44:25 +0100 (CET) Received: from localhost ([::1]:47460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1my56W-0008PN-9u for larch@yhetil.org; Thu, 16 Dec 2021 23:44:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1my56B-0008Np-02 for guix-patches@gnu.org; Thu, 16 Dec 2021 23:44:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54287) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1my56A-0004or-Nc for guix-patches@gnu.org; Thu, 16 Dec 2021 23:44:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1my56A-00015B-Kt for guix-patches@gnu.org; Thu, 16 Dec 2021 23:44:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v5 07/45] guix: node-build-system: Add #:absent-dependencies argument. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Dec 2021 04:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51838 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Philip McGrath , 51838@debbugs.gnu.org Cc: Timothy Sample , Pierre Langlois , Jelle Licht Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.16397162204119 (code B ref 51838); Fri, 17 Dec 2021 04:44:02 +0000 Received: (at 51838) by debbugs.gnu.org; 17 Dec 2021 04:43:40 +0000 Received: from localhost ([127.0.0.1]:37600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1my55o-00014N-2V for submit@debbugs.gnu.org; Thu, 16 Dec 2021 23:43:40 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1my55j-00013z-GO for 51838@debbugs.gnu.org; Thu, 16 Dec 2021 23:43:38 -0500 Received: by mail-wr1-f68.google.com with SMTP id a9so1689340wrr.8 for <51838@debbugs.gnu.org>; Thu, 16 Dec 2021 20:43:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=8BR1qRBJA3Q4AIDxPE7eukpmyexmuwbXQ69/leCIYyE=; b=VjMjW/ZHaA9bLjFEsoW7MGCAob4wDT6x91fuvTtPJymljh/usn+3/1XKIgkN8vzXEV xURJXgtFQkoc4iGZWK6BDcVDPYsOJ1VlAB0tG3z4xAErkucZFrydMnRwgWu0XaS3yjUJ E64YpCtkHHYJUygcms1bgi5lQQGI11sgezWpINlGolwloewaYXOihSR5l4e1HgN5QAek GKPSIkU6ekvf49VQcgn0NmFiqaU34elDecUSADNrSGLiuMYAhh5QM6xL89gWQXeh0iei tjDmkxf76yPfyORLxwVy4NRxm8TGBiyk6xBqlzVjLx7yJYb86zScq/+K+37GR+SNCD8k Skpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=8BR1qRBJA3Q4AIDxPE7eukpmyexmuwbXQ69/leCIYyE=; b=vY578Oapsf47YLqo7BmkfiE9WG49DHI4XIsgcUIZ/i0paheIddjTX+ihcd48Oh9n4W w5dFoZp8FgKSnA3oEYOhC14h3OTiWeiZrsPC3AcLJXy3VfSfV+i8nyqJ/c5F2G6wneRB oWbpk3kGTx1FLBY3+DVhLvRNoOVF2UAPNs/YI0UKRNTqOELh16MHacIs4wlh7XEk/0nc u0YcWnnTKRFtXYiacHBHC7vCu0e6yWcByDltRLa0Dx3PI4t1q1wOUd+rALzm0R/D5Rfj b3JBkQ8/ONSUseopMI9TWg4R7+2PbEUnt6nrTzdYsyZrGSjq1oSJXSwAaA0S9DHQHCBN I8gA== X-Gm-Message-State: AOAM532cm9i2VNPn2Mz6wB9121/vr+17G/lhiY70160m1f0heUcwvHEe ETUactSseBANpYLrdaPRQPg= X-Google-Smtp-Source: ABdhPJy8bNpBBB5qETJ23cTtBqJLLPibK+EZ1Yjirf2iGlZDE8KY9Kc7gLr14VkqLPVdvduuaj5mnQ== X-Received: by 2002:adf:d1e2:: with SMTP id g2mr945111wrd.362.1639716209641; Thu, 16 Dec 2021 20:43:29 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id j3sm1160841wro.22.2021.12.16.20.43.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Dec 2021 20:43:29 -0800 (PST) Message-ID: From: Liliana Marie Prikler Date: Fri, 17 Dec 2021 05:43:23 +0100 In-Reply-To: <20211217020325.520821-8-philip@philipmcgrath.com> References: <20211213060107.129223-1-philip@philipmcgrath.com> <20211217020325.520821-1-philip@philipmcgrath.com> <20211217020325.520821-8-philip@philipmcgrath.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 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: 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639716265; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=8BR1qRBJA3Q4AIDxPE7eukpmyexmuwbXQ69/leCIYyE=; b=recIJauKwjKUbmTpaweOraAwBa80iAsaCngZkNrQhfetad0I9VGp9UiE2Owc7hQTkFXbUo u5TmvLza0Y1YEg58wWpcHla7m5Iw7qpOulqNNVENwI+OVUKCTWMh7vw5hVt6wNiUxACfWL komaOGUX09wtl27wCK/2s/OKQo1fmtPsf7dwv4KX8swddwF8URVEr9ZmnyYMMU90VOSxdV V0XOSaQEUT3RhPbXxHZ3e/t20HtF5+Z0S+VqMZFEfeHSLxIr4tnRpl69cogUwvGgfE9dZw J6SP8uvzp0kdRo++BUXmLuI9qp3lmXeBgGqUwIetBSJE4tPPZhUwUCJMjvC/fw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639716265; a=rsa-sha256; cv=none; b=Csf20GnjsV29u8tpNlO1/nOEHgl70kUHEeVJRvK5geEj+UONRzEnu4ITgi920PdCEKH0M4 4yJnzOMFRGoJ6dHFa0p7s+/PUIkZkaEYBzMh7VcKwIZ39W2AHqlnvbOydSHqs7lU5ktNVK VWbktjWoDP+Tw7+Hgs77AIIdKaX2+WsPmXVFEqq+/CJVag0SbbTqo2Xvqu/EDC+qX4u4mW PWpYiGfYim7qHhqE9pMmGeWPJCSz7U0hWZBBQXRxOQwWeX37s0sAxAZOykfeFGBksIY8dl cXuSPnOAzaNIPu5U61TB4Q9KJxVr4pvoqqFO8wxQRFDQ92bm4aruNIZPnVltag== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="VjMjW/ZH"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Spam-Score: -2.99 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="VjMjW/ZH"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Queue-Id: 171453780D X-Spam-Score: -2.99 X-Migadu-Scanner: scn0.migadu.com X-TUID: /VJceg94oSP4 Hi, Am Donnerstag, dem 16.12.2021 um 21:02 -0500 schrieb Philip McGrath: > * guix/build-system/node.scm (lower, node-build): Add optional > argument #:absent-dependencies with default of ''(). Pass it on > to the build-side code. > * guix/build/node-build-system.scm (patch-dependencies): Respect > the #:absent-dependencies argument, removing specified npm > packages from the "dependencies" or "devDependencies" tables > in "package.json". > [...] > +                (absent-dependencies ''()) > [...] > +                     (absent-dependencies ''()) > [...] > -(define* (patch-dependencies #:key inputs #:allow-other-keys) > +(define* (patch-dependencies #:key inputs absent-dependencies > +                             #:allow-other-keys) >   >    (define index (index-modules (map cdr inputs))) >   > @@ -86,7 +87,9 @@ (define (resolve-dependencies meta-alist meta-key) >        (('@ . orig-deps) >         (fold (match-lambda* >                 (((key . value) acc) > -                (acons key (hash-ref index key value) acc))) > +                (if (member key absent-dependencies) > +                    acc > +                    (acons key (hash-ref index key value) acc)))) >               '() >               orig-deps)))) I might be sounding like a broken record here, but again for the sake of being able to add or remove inputs on the user side without duplicated efforts, I'd use something else in lieu of absent- dependencies. For the time being, I think a switch between "fail" and "warn about missing dependencies" ought to be enough. In the future, we might want to make it so that packages can specify which dependencies they absolutely require and which they don't (or if possible infer that from dependencies). WDYT?