From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0JhtEAIQ2WH0kQAAgWs5BA (envelope-from ) for ; Sat, 08 Jan 2022 05:16:02 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MPMaDQIQ2WFjDAEAauVa8A (envelope-from ) for ; Sat, 08 Jan 2022 05:16:02 +0100 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 969643FF5A for ; Sat, 8 Jan 2022 05:16:01 +0100 (CET) Received: from localhost ([::1]:35958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6396-0000Bj-Le for larch@yhetil.org; Fri, 07 Jan 2022 23:16:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n638C-0008Sc-UR for guix-patches@gnu.org; Fri, 07 Jan 2022 23:15:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53294) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n638B-0003LH-0j for guix-patches@gnu.org; Fri, 07 Jan 2022 23:15:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n638A-0001VO-Sl for guix-patches@gnu.org; Fri, 07 Jan 2022 23:15:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v6 05/41] guix: node-build-system: Add 'delete-dependencies' helper function. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 08 Jan 2022 04:15: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: Liliana Marie Prikler , 51838@debbugs.gnu.org Cc: Timothy Sample , Pierre Langlois , Jelle Licht , Leo Famulari Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.16416152505669 (code B ref 51838); Sat, 08 Jan 2022 04:15:02 +0000 Received: (at 51838) by debbugs.gnu.org; 8 Jan 2022 04:14:10 +0000 Received: from localhost ([127.0.0.1]:46193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n637J-0001TN-Dw for submit@debbugs.gnu.org; Fri, 07 Jan 2022 23:14:09 -0500 Received: from mail-ua1-f47.google.com ([209.85.222.47]:38814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n637G-0001Sa-L5 for 51838@debbugs.gnu.org; Fri, 07 Jan 2022 23:14:07 -0500 Received: by mail-ua1-f47.google.com with SMTP id o63so13767410uao.5 for <51838@debbugs.gnu.org>; Fri, 07 Jan 2022 20:14:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=H97pSS6UGhbFKRNGBVLQJnoPVJ+RBoY1rF+/QdtwNoM=; b=UQcrZK1QjbXOdGc9/EpOHtyLbQARhNbSBFiwq3WtaY9HOjE+WiIs6BfQGZPtxMKGqM dqccG2BxmxzGX3bH3/ZXWkAn7X0KqcALiHWEkjJWNT2twCEgycLVzgIy6POEfkHSE6J9 6bZWpzzNey0vAIA1gCLY0Vv/xQZfW/1/vwizy4iNWgyLTzcyWI4gndC0VDF5f45rB3j4 Gub9EZKPFZTAvhRdI1RJPL2ApqAB30afee9RASDEFml+vop1NMyrZlEV67QXMiH0LeNJ EV1Nd20T5N7Zu4ymVwoEEIU3BJXcz0AQVpuSzWZQe52gdGXitrTzIB51zpmbHKxR1wv2 B8sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=H97pSS6UGhbFKRNGBVLQJnoPVJ+RBoY1rF+/QdtwNoM=; b=O3WF4J0uB2FinKaZe9BoIKPQ+ZFX7ezro/zzN21apzOI++ihUneUP9AiqgbB/inQqb YB2mgIhOEdAU7AqF5t873aJj3aTm2Ytt1r+RiOtJdue2rpE83rDrW/t3AEyUP+2WChFC DpMtZK4wxHEt+CQHb8MJqz2GttS5n4MzPxvC13F7bWt+r/0CLDY3uGdUSz229KkWoBho qIiv2SHw8BD8VPPsIjqLOMZGosFs2DVYzS93oRZ15koywdwCXO1Qj1Y9Db0c1YFaAZXD pKpkgiaqB4lea79XT/ZcTF/3nnB9zpo8ANtDFh104EnoadyOPEeR4i5s9zO2fbsqNB5d k/7A== X-Gm-Message-State: AOAM531nuRW91Pr75Nezt0UrLOw5y5lQu4GUaKc9+dIzBYVoVS4ROrDo GWfZ8HvqOthdkwd0dqINurrFvA== X-Google-Smtp-Source: ABdhPJzkUjipNh3YE+uSDpV3Uuo5DsOx0l+3Lh2uWBzq5iJOMjbUERtUbXE9rUEgCEqFsCrGvD+4PA== X-Received: by 2002:a67:bb01:: with SMTP id m1mr23717767vsn.48.1641615241138; Fri, 07 Jan 2022 20:14:01 -0800 (PST) Received: from [192.168.45.37] (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id b42sm315065uad.12.2022.01.07.20.14.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Jan 2022 20:14:00 -0800 (PST) Message-ID: <546445d8-55b9-62ee-a73e-a30cbf2dd7fc@philipmcgrath.com> Date: Fri, 7 Jan 2022 23:14:00 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Content-Language: en-US References: <082a81964a43ae5f735ad2ca433d0dfe00859c35.camel@gmail.com> <20211230073919.30327-1-philip@philipmcgrath.com> <20211230073919.30327-6-philip@philipmcgrath.com> <7d5dd434d7750123fa32cb623df0463d60d3f82f.camel@gmail.com> <23eaa7e6-c087-d885-924a-192917758bbf@philipmcgrath.com> <5b83ba5e35af7ac956a6d5de41cb98a892863b55.camel@gmail.com> <4e443a9e-e024-d641-14cd-e36ef7cae46d@philipmcgrath.com> <1e4755f3697d54b751684210215a1337c101f4ca.camel@gmail.com> From: Philip McGrath In-Reply-To: <1e4755f3697d54b751684210215a1337c101f4ca.camel@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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=1641615361; 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=H97pSS6UGhbFKRNGBVLQJnoPVJ+RBoY1rF+/QdtwNoM=; b=fK2LNHktBXOBjjFXby1Ow5nGlAqzeS7rSv/ZKJcFUGZcS3sm/qy5UzpVvbZM0wvkKKlQLP 33QesyI2YC1h6YrVDMPpZlwR9EB9iisd277y21fPvj8R43LRb8nI4hvvxDX6aPrt/sD/87 rFGofk+zm8y74f68Kt0pWLPb6oYGS0PkEnstYm0/ZRqr9moMm75JgRX+AYJPQSaMpxZ9Ly JFy/0XVhoCshzoskjmgENec2OUbO+AJ9RpYWd6i0u7GTnd69YdxHnWgkVUx4TKDVvy0qyK 3dPjztvBBBZQSKm2zEL+FE48uVrKkW7Ie0QkhXGLvfM6Y1HfTf5XJjc7fTbS+Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641615361; a=rsa-sha256; cv=none; b=BCBau38/pjPwl4FLUz5/Joh2zD4pGLHVQ+LTm+6VXrRZeAXU/G8KzRZ0iGxDHr4Yb86PnM MQZSp1VmswgfPL4ErC5bAjfT7bxRnPwdqaJFpEqZlLnD6NFWBtm88Qmzgmnz4hT1cvRHkA uwWhMbYAtwbByvlnh8oYxuJcEDhwad0bJNy2Iw4Hqx631FAIV83Biz2O3ei9tuRNkQyBqf 0bOh4cJAQdd24Na8JtoWaw1i0lEzVIBI04PyTHrsr6KggTpVmXz72nBZjlGJ/T+vQztu0t XxEsUd81/oOKSMX/32WhuF/9in+F6kdYnsZ+yX+8njbBdC7zDRx9zgMwTWPBMw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=UQcrZK1Q; dmarc=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: -0.60 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=UQcrZK1Q; dmarc=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: 969643FF5A X-Spam-Score: -0.60 X-Migadu-Scanner: scn1.migadu.com X-TUID: bpJ1jHACiZAZ Hi, On 1/5/22 16:04, Liliana Marie Prikler wrote: > Am Mittwoch, dem 05.01.2022 um 14:08 -0500 schrieb Philip McGrath: >> In case it helps at all to state my position more fully: with or >> without Guix, I think a major purpose, perhaps even the primary >> purpose, of _any_ build system is to relieve users (including >> ourselves) of the cognitive burden of lower-level details. Build >> systems are a means of abstraction and encapsulation. >> >> [...] > I agree with you that abstractions ought to help, but we do have some > disagreements about the amount by which certain abstractions help. > Those are gut feeling value judgements, they're not all entirely > rational. > >> I hope this is just a matter of some nuance in the connotation of >> the word "gratuitous" not coming across properly, but I would >> appreciate the same consideration being extended to my perspective. >> >> Almost tautologically, I don't think adding '#:absent-dependencies' >> would be gratuitous, or I wouldn't have proposed it. > Generally, keywords are reserved for a few special operations. I don't > currently have the time to write them all up, but suffice it to say I > don't believe the way #:absent-dependencies would be used fits into any > of those. I can write that up in a later message if you feel it's > imporant enough. It isn't needed right now, since we've agreed to go ahead without '#:absent-dependencies', but, since I do intend to propose '#:absent-dependencies' immediately thereafter, I think it would be useful: this seems to get close to the core of the disagreement we've been having for the last ... couple months? I don't see a reason why we should hesitate to use keywords when they enable especially nice code. Actually, I've sometimes wished build systems would '#:allow-other-keys'. I'd expect '#:absent-dependencies' to be more common for 'node-build-system' packages than '#:tests?', since I'd expect almost every package that would use '#:tests? #f', plus a significant number that wouldn't, to use '#:absent-dependencies'. Jumping back to an earlier email: On 12/30/21 21:46, Liliana Marie Prikler wrote: > Am Donnerstag, dem 30.12.2021 um 20:09 -0500 schrieb Philip McGrath: >> In my view, the high-level purpose of 'delete-dependencies', >> '#:absent-dependencies', or whatever is to gather our collective >> procedural knowledge about how to modify a "package.json" file to >> build a package without some of the dependencies its developers have >> declared and to encode that knowledge in a single, abstracted point >> of control in 'node-build-system', so that authors of Node.js package >> definitions can simply specify which declared dependencies are absent >> and leave it to 'node-build-system' to act accordingly. (I don't >> think it matters _why_ the dependencies are absent, i.e. whether we >> don't want the them or merely don't have them.) > For the record, you can delete present dependencies as well, which is > one shortcoming in the "absent dependencies" metaphor. [...] >> It is unnecessarily flexible because, if a package author ever passes >> some other value for '#:json-keys', that would seem to indicate that >> there's some procedural knowledge missing from 'node-build-system', >> and it should be added there. > The reason I have it as such is that a packager might decide in the > future to e.g. only drop a peer dependency, that might share a name > with a dev dependency or something along those lines. Since I don't think I've written it down before, my hope in describing them as "absent" dependencies was to state that they are absent from the build environment, while being as neutral as I could about _why_ they might be absent. In particular, I wanted to avoid the implications of "missing", which can have implications of "we don't know where X is" and "it would be better if we found X". One day, it would probably be nice to have 'node-aws-sdk' packaged for Guix, but, even if we knew the precise line number in "node-xyz.scm" where it we could find its definition, we would not want to use it while building 'node-sqlite3'. So, having established that the adjectives are a little fuzzy, I don't understand what it would mean to "delete present dependencies". If they are present in the build environment, why delete them? If the issue is that they only are needed at build time, the 'install' phase of 'node-build-system' should already handle this by passing '--production' to 'npm install'. If a "peerDependency" and a "devDependency" share a name, then they refer to the same package. I believe it would be an error (logically, that is: I do know npm would not raise an exception) to have a "peerDependency" that is also a "devDependency" or a "dependency": as I understand it (poorly!), peer dependencies are meant to be some weaker kind of relationship. But again, none of this needs to stand in the way of merging this patch series. -Philip