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 ms0.migadu.com with LMTPS id KBBkHb4QzmH6RwAAgWs5BA (envelope-from ) for ; Thu, 30 Dec 2021 21:04:14 +0100 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 QJM5Fr4QzmGGhgAAG6o9tA (envelope-from ) for ; Thu, 30 Dec 2021 21:04:14 +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 955A321ED1 for ; Thu, 30 Dec 2021 21:04:13 +0100 (CET) Received: from localhost ([::1]:48146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n31em-0003D2-Gs for larch@yhetil.org; Thu, 30 Dec 2021 15:04:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n31ec-0003Ct-6C for guix-patches@gnu.org; Thu, 30 Dec 2021 15:04:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42975) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n31eb-00064B-Ta for guix-patches@gnu.org; Thu, 30 Dec 2021 15:04:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n31eb-0000f7-Qt for guix-patches@gnu.org; Thu, 30 Dec 2021 15:04:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v6 00/41] guix: node-build-system: Support compiling add-ons with node-gyp. Resent-From: Ryan Sundberg Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 30 Dec 2021 20:04:01 +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: 51838@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16408946112494 (code B ref -1); Thu, 30 Dec 2021 20:04:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Dec 2021 20:03:31 +0000 Received: from localhost ([127.0.0.1]:54521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n31e6-0000e8-Bm for submit@debbugs.gnu.org; Thu, 30 Dec 2021 15:03:30 -0500 Received: from lists.gnu.org ([209.51.188.17]:49798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n31e4-0000dx-CC for submit@debbugs.gnu.org; Thu, 30 Dec 2021 15:03:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n31e4-0003AU-65 for guix-patches@gnu.org; Thu, 30 Dec 2021 15:03:28 -0500 Received: from mail.arctype.co ([138.68.9.245]:49419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n31e1-00060n-6x for guix-patches@gnu.org; Thu, 30 Dec 2021 15:03:27 -0500 Received: from authenticated-user (mail.arctype.co [138.68.9.245]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.arctype.co (Postfix) with ESMTPSA id 3111713B134 for ; Thu, 30 Dec 2021 20:03:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=arctype.co; s=mail; t=1640894597; bh=nKywFiDyM6vvpHz54tTAP69kcdd2ZdifFds21oAVqPY=; h=To:References:From:Subject:Date:In-Reply-To:From; b=SPu8JHfOaCTmAipm0N7oTMsTP7FwsPXIOUyqBw5wYhdi+e+qoa8dVZ62tjfTi8qrp id1t8+S5MZ01h2EzvgH/Dh1h6ASfYVdlRu9lSN1iD15PllIRWLlsd7Nl5k8TT7kcPo puUtDWs6b3R9KsoRukZV+3ahB5r+DrMFs6OX3gBpPmKADKrdMllzra1vJ3/UAzgEb3 axam0iJTDx3yCIo0YxZ5hoYPYNcXPllOjJTxOTE3Lrt2Vrvjdzb7TzqoGuLqfgxShW DY2wODGcg8uHzjycOyryAjLUId+iyyUvZ92tVymsReKndNX0zw/Z4y0+any0r8k7s8 KEQ+gsmY1C3hg== References: <082a81964a43ae5f735ad2ca433d0dfe00859c35.camel@gmail.com> <20211230073919.30327-1-philip@philipmcgrath.com> Message-ID: Date: Thu, 30 Dec 2021 12:03:15 -0800 MIME-Version: 1.0 In-Reply-To: <20211230073919.30327-1-philip@philipmcgrath.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UvqXuym3V09iFcNB84o1WHcSDiqqa2k4r" Received-SPF: pass client-ip=138.68.9.245; envelope-from=ryan@arctype.co; helo=mail.arctype.co X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable 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" Reply-to: Ryan Sundberg X-ACL-Warn: , Ryan Sundberg via Guix-patches From: Ryan Sundberg via Guix-patches via 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=1640894654; h=from:from:sender:sender:reply-to: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:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=lsaBOrcaiNKhpHX9uPV8aGFnsD7pY0noZpFHWd6aO40=; b=KmUBO0rg/Hb56M3xdwDlankTqJh/y7gB8w1PiZWSbXef8RIV+IIixWBPzUQgeFFZCDDyDf uF19bUABY097FKznE2G/I15uojJ6YbVpqLti2sP/iizcr8XoSsBx2aLQjFJGAoFERVF8Ek UOM43cfb4maB0qm1wPKbFIHGfh08va9Qnt6B4pJGQY09ujiypDSnfsZMZfMs32aXsGszF1 bd6DjBDuGHuSZ6liEswZdBdoG+79mg5oQg+5PGwAlcr9TnxsOPinOZPgOOdeGwpnDYTxfw bFbITm7ZhDt4GqrvjcW6uUyfjbFLygxGNX6x8853Zv7vTr0rRAzuXvRkCHfe3A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640894654; a=rsa-sha256; cv=none; b=cpO0/pgoindDlvD1srLoS9NLzab5p9+9upzMQxtkA4AUxpcWXeTXggRZkNv7T6v83MzgpD o1TavTXWcdsLcu/hUfTrFi+pLxZRSzWO1eQNIwPRYXoRVnUAWW7JLhDnoQoMK+Rui7mu2H BhC6faxxHhaVrT8/9ppGZ2fRrIQa+F5EUaj5vZjQrmf0Ks2yXxBXp3suJKWOX2nkAIjHQW cMTeuMz4EAvYCVitunfPyY/j83F5ImiS95JbBic4UTiQ1WqpoJszR70OrHrXgU5fBa/fst kQWnTmwQwR3dBOMfOJ6AMALZ23npmLQw0wH3MNQdW8wsP3UKF7RghAOpQb8pJw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=arctype.co header.s=mail header.b=SPu8JHfO; dmarc=pass (policy=none) header.from=gnu.org; 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: -5.87 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=arctype.co header.s=mail header.b=SPu8JHfO; dmarc=pass (policy=none) header.from=gnu.org; 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: 955A321ED1 X-Spam-Score: -5.87 X-Migadu-Scanner: scn1.migadu.com X-TUID: 0lDNxjDmKoRx This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --UvqXuym3V09iFcNB84o1WHcSDiqqa2k4r Content-Type: multipart/mixed; boundary="gL5S8NWbFEYZyWUCe3MBTIY6ljm0Jxbam"; protected-headers="v1" From: Ryan Sundberg To: guix-patches@gnu.org Message-ID: Subject: Re: [bug#51838] [PATCH v6 00/41] guix: node-build-system: Support compiling add-ons with node-gyp. References: <082a81964a43ae5f735ad2ca433d0dfe00859c35.camel@gmail.com> <20211230073919.30327-1-philip@philipmcgrath.com> In-Reply-To: <20211230073919.30327-1-philip@philipmcgrath.com> --gL5S8NWbFEYZyWUCe3MBTIY6ljm0Jxbam Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable I think the #:absent-dependencies pattern is very straightforward argument and is clearly a common enough occurrence to merit a shorthand expression. I have not been following the developments in the node-build-system here recently but it looks like lots of progress is being made. Thanks all for contributing! -- Sincerely, Ryan Sundberg On 12/29/21 11:38 PM, Philip McGrath wrote: > Hi Liliana (and everyone), >=20 > Thanks for taking care of the earlier patches from the series! >=20 > It sounds like (guix build json) is going to be around for a reasonably= > long time, and I'm ok with that. >=20 > In the hope of clearing a path to move forward, I'm sending v6 of this > patch series, immediately followed by a closely-related v7: I strongly > prefer v7, but I would be ok with either version being applied if one o= f > them can achieve consensus. (If v6 is merged, I'll send a separate patc= h > series to propose '#:absent-dependencies'.) >=20 > I've put the two versions up on GitLab > as = > and , > respectively. >=20 > I've re-organized the patches in the series somewhat to facilitate a > minimal, side-by-side comparison between '#:absent-dependencies' and th= is > approach: >=20 > On 12/20/21 17:00, Liliana Marie Prikler wrote: >> (add-after 'patch-dependencies 'drop-junk >> (lambda _ >> (with-atomic-json-replacement "package.json" >> (lambda (json) (delete-dependencies json '("node-tap")))))) >=20 > The series is now organized as follows: >=20 > - The first 4 patches are identical in v6 and v7: >=20 > - Patches 01 & 02/41 are non-controversial build system changes > ('delete-lockfiles' and libuv). >=20 > - Patch 03/41 adds to (guix build node-build-system) several util= ity > functions for transforming JSON in the representation used by (= guix > build json), especially functional update of tagged JSON > objects. It also adjusts the rest of (guix build node-build-sys= tem) > to make use of those functions, eliminating all uses of > 'assoc-set!' and other procedures that mutate assosciation list= s. >=20 > Of the new functions, only 'with-atomic-json-file-replacement' = is > exported for now: my hope is that further (valuable and importa= nt!) > discussion about the API design of these functions or their > implementations need not block either v6 or v7 of this series. >=20 > - Patch 04/41 adds the 'avoid-node-gyp-rebuild' phase. I've re-wo= rked > the implementation to use the new helper functions. >=20 > - Patch 05/41 is the truly significant difference between v6 and v7: = it > implements the strategy for dealing with missing dependencies. >=20 > In v6, it exports a new public function 'delete-dependencies' from > (guix build node-build-system). >=20 > In v7, it adds '#:absent-dependencies'. One difference from previou= s > versions of this series is that it handles '#:absent-dependencies' = in a > new 'delete-dependencies' phase, which makes the change even more > self-contained. >=20 > - Patches 06 through 17/41 adjust existing packages to make use of th= e > approach to missing dependencies from patch 05/41 of each series. >=20 > - Patches 18 through 41/41 add the new packages excercising native ad= don > support, again differing based on the approach from patch 05/41. Th= e > other slight difference from previous versions of this series is th= at, > where applicable, I've adjusted the new package definitions to use > 'with-atomic-json-file-replacement' and never to use 'assoc-set!' o= r > other procedures that mutate assosciation lists. >=20 > I continue to think that '#:absent-dependencies' is a good approach, in= > brief, as Jelle put it in , beca= use: >=20 > On 12/20/21 18:10, Jelle Licht wrote: >> Liliana Marie Prikler writes: >>> Am Montag, dem 20.12.2021 um 14:33 -0500 schrieb Philip McGrath: >>>> If we took your final suggestion above, I think we'd have something >>>> like this: >>>> >>>> ``` >>>> #:phases >>>> (modify-phases %standard-phases >>>> (add-after 'unpack 'delete-dependencies >>>> (make-delete-dependencies-phase '("node-tap")))) >>>> ``` >>>> >>>> That seems pretty similar to, under the current patch series: >>>> >>>> ``` >>>> #:absent-dependencies '("node-tap") >>>> ``` >>> That is the point, but please don't add a function called "make-delet= e- >>> dependencies-phase". We have lambda. We can easily add with-atomic-= >>> json-replacement. We can also add a "delete-dependencies" function >>> that takes a json and a list of dependencies if you so want. >>> >>> So in short >>> >>> (add-after 'patch-dependencies 'drop-junk >>> (lambda _ >>> (with-atomic-json-replacement "package.json" >>> (lambda (json) (delete-dependencies json '("node-tap")))))) >>> >>> would be the "verbose" style of disabling a list of dependencies. >>> >> >> I think you are _really_ underestimating how many packages will need a= >> phase like this in the future. I would agree with this approach if it >> were only needed incidentally, similar to the frequency of patching >> version requirements in setup.py or requirements.txt for python >> packages. >> >> Pretty much everything except the '("node-tap") list will be identical= >> between packages; how do you propose we reduce this duplication? At th= is >> point I feel like I'm rehasing the opposite of your last point, so let= >> me rephrase; how many times do you want to see/type/copy+paste the abo= ve >> snippet before you would consider exposing this functionality on a >> higher level? >> >=20 > Additionally, I think having a phase in '%standard-phases' is a good wa= y of > addressing the need to use 'delete-dependencies' after the > 'patch-dependencies' phase, which I explain in patch v6 05/41. >=20 > But, again, I could live with either v6 or v7 being applied if one of t= hem > can achieve consensus. >=20 > So, without further ado, here is v6! >=20 > -Philip >=20 > Philip McGrath (41): > guix: node-build-system: Add delete-lockfiles phase. > guix: node-build-system: Add implicit libuv input. > guix: node-build-system: Add JSON utilities. > guix: node-build-system: Add avoid-node-gyp-rebuild phase. > guix: node-build-system: Add 'delete-dependencies' helper function. > gnu: node-semver-bootstrap: Use 'delete-dependencies'. > gnu: node-ms-bootstrap: Use 'delete-dependencies'. > gnu: node-binary-search-bootstrap: Use 'delete-dependencies'. > gnu: node-debug-bootstrap: Use 'delete-dependencies'. > gnu: node-llparse-builder-bootstrap: Use 'delete-dependencies'. > gnu: node-llparse-frontend-bootstrap: Use 'delete-dependencies'. > gnu: node-llparse-bootstrap: Use 'delete-dependencies'. > gnu: node-semver: Use 'delete-dependencies'. > gnu: node-wrappy: Use 'delete-dependencies'. > gnu: node-once: Use 'delete-dependencies'. > gnu: node-irc-colors: Use 'delete-dependencies'. > gnu: node-irc: Use 'delete-dependencies'. > gnu: Add node-inherits. > gnu: Add node-safe-buffer. > gnu: Add node-string-decoder. > gnu: Add node-readable-stream. > gnu: Add node-nan. > gnu: Add node-openzwave-shared. > gnu: Add node-addon-api. > gnu: Add node-sqlite3. > gnu: Add node-file-uri-to-path. > gnu: Add node-bindings. > gnu: Add node-segfault-handler. > gnu: Add node-ms. > gnu: Add node-debug. > gnu: Add node-serialport-binding-abstract. > gnu: Add node-serialport-parser-delimiter. > gnu: Add node-serialport-parser-readline. > gnu: Add node-serialport-bindings. > gnu: Add node-serialport-parser-regex. > gnu: Add node-serialport-parser-ready. > gnu: Add node-serialport-parser-inter-byte-timeout. > gnu: Add node-serialport-parser-cctalk. > gnu: Add node-serialport-parser-byte-length. > gnu: Add node-serialport-stream. > gnu: Add node-serialport. >=20 > gnu/packages/node-xyz.scm | 1013 +++++++++++++++++++++++++++++-= > gnu/packages/node.scm | 78 ++- > gnu/packages/zwave.scm | 64 ++ > guix/build-system/node.scm | 9 +- > guix/build/node-build-system.scm | 355 ++++++++++- > 5 files changed, 1464 insertions(+), 55 deletions(-) >=20 --gL5S8NWbFEYZyWUCe3MBTIY6ljm0Jxbam-- --UvqXuym3V09iFcNB84o1WHcSDiqqa2k4r Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEyVG5Gm1pvFAzyXC2aiMi+MCr96sFAmHOEIMFAwAAAAAACgkQaiMi+MCr96v8 +Qf9E3TgGQ2cyayaXDetDzQ5/vJE/Pyjb0AL3qe54bup/coGKui97CHDatQ/kiecSN2gk5LNOwHC J0V3W3PnZ5/KUcpKtDXj5GpJ4jBj8NwOUxUYyZwR0qdbrJU/Q19GpTncCYKPwIW9UNIIObXndlqT gMBVfTR0cGDC/JmtXwDD1OD6cAC2DXzWB6lOMH3crW34tyqOSkmwDln3aVoQF36hBtU8blFl1P73 lx2J/Fn43yMZyldsPSk8FvUgn60alWIQXq7IxYJDmy+Wu7D1G1b5jOdIS7yNYBvZIL0Z98uTH0Qs fuN634jxqVwb94ExpjHsRZsaThE6DB+P2krYgqKiUA== =i6mb -----END PGP SIGNATURE----- --UvqXuym3V09iFcNB84o1WHcSDiqqa2k4r--