From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SDMoAjW8xGFfQAAAgWs5BA (envelope-from ) for ; Thu, 23 Dec 2021 19:13:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IH+BOTS8xGEzJAAAB5/wlQ (envelope-from ) for ; Thu, 23 Dec 2021 18:13:08 +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 9413699F5 for ; Thu, 23 Dec 2021 19:13:08 +0100 (CET) Received: from localhost ([::1]:35328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0SaR-00013m-OM for larch@yhetil.org; Thu, 23 Dec 2021 13:13:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0SaN-00013e-6u for guix-patches@gnu.org; Thu, 23 Dec 2021 13:13:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n0SaM-0001Jl-Pk for guix-patches@gnu.org; Thu, 23 Dec 2021 13:13:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n0SaM-0000HG-HT for guix-patches@gnu.org; Thu, 23 Dec 2021 13:13: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: Thu, 23 Dec 2021 18:13: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 , Timothy Sample Cc: 51838@debbugs.gnu.org, Pierre Langlois , Jelle Licht Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.16402831481026 (code B ref 51838); Thu, 23 Dec 2021 18:13:02 +0000 Received: (at 51838) by debbugs.gnu.org; 23 Dec 2021 18:12:28 +0000 Received: from localhost ([127.0.0.1]:34885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0SZo-0000GU-CM for submit@debbugs.gnu.org; Thu, 23 Dec 2021 13:12:28 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0SZm-0000GG-KH for 51838@debbugs.gnu.org; Thu, 23 Dec 2021 13:12:27 -0500 Received: by mail-wr1-f67.google.com with SMTP id j18so13060716wrd.2 for <51838@debbugs.gnu.org>; Thu, 23 Dec 2021 10:12:26 -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=+D6IBvQk5QF5+IAygNEQMwWqxV+DionxiMrb/daSE28=; b=ljgk3a63QCiX4y9Fkp4UupbDC2tlo52XSwffuGxO8hY71rdaTRAKRLTc2AlUOuF9kf NVkMnrHLwcSVk7zQTAKG7QQxRPCxX4XZPyfo8mxK0eVDWjGdFb4hPuhDsz1uwbNxkCyw xqsHDWGRc5HlmEGTsH8Z2xTMks4KniULfYfl77aouzlocEP7fGbnvOUdjYaIlo0dNh0N +1hEQEE8mGmxmPX5vgm8YqfsxoDM1I4bdhxFFMWBMobvOZoHPxsKfY9K9w40TGixJREv yOH0sn6XrlThsYBg+mEDJhX6qEfhd4TFrrniSVRZvG7m7Bw2BI6uLFc3uVPQeTdEXC5+ 5LeA== 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=+D6IBvQk5QF5+IAygNEQMwWqxV+DionxiMrb/daSE28=; b=NKllGD3cjJcig/R4REEZzVJ5VoR91Oey/nMcfiGqF73MeGV+ktCCZfmvTdHEjJksXJ E8VwtGfLE6Wqjv3GzCd3QNRYkZN2gLgEBc/uPuE4JUFk8VYi7IEmATLvi1aTJ1AGgSOg f2OyBthcm0xI1sV8GRvUkfkBkqLjSzyYMXUPQ2PADlXsVoCQn8t9UmIyCIqrMzyQgQ4t wlPvxCgzY2Bomo9UpOZMge1iBc596QOqkSU9r8gn89Cz1oCJT2+FKFu/OXqakeln+etj khJwIvx5uQCoo1ECmWzRyai1o5SiLXK6Lj7eSQvOVestz0JaQnf2RgnIWwbgWdrT9s3+ SmnA== X-Gm-Message-State: AOAM5328+/IgCtiXxo+Za0SDE43KgQEETvZk83fNlp1s0svTH7h8Lvqo A8gXdbt0mzYZYTtdtXkLBRE= X-Google-Smtp-Source: ABdhPJxnI9dul/BycEW5qVivQP4fA7ybWZvpyWCMSUeSYMGmw+6UXzI+sSr2QsI9f4Eaz8U5xtrTOA== X-Received: by 2002:adf:a10f:: with SMTP id o15mr2535357wro.592.1640283140548; Thu, 23 Dec 2021 10:12:20 -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 n7sm5705827wms.45.2021.12.23.10.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Dec 2021 10:12:19 -0800 (PST) Message-ID: <082a81964a43ae5f735ad2ca433d0dfe00859c35.camel@gmail.com> From: Liliana Marie Prikler Date: Thu, 23 Dec 2021 19:12:17 +0100 In-Reply-To: References: <20211213060107.129223-1-philip@philipmcgrath.com> <20211217020325.520821-8-philip@philipmcgrath.com> <87k0g36xp3.fsf@ngyro.com> <871r2a7hme.fsf@ngyro.com> <815f327e36ecd24066179586997947ecd8f31150.camel@gmail.com> <33696592-8a3a-8260-bf27-652cf78727a6@philipmcgrath.com> <2c803ea8f5c5c16c892f5528f63a4c7e98470c5b.camel@gmail.com> <314a0ea4-a851-6642-0a59-d4c61d65c242@philipmcgrath.com> <35164d79ab6ae1c0595d27f023376cf98ab1a39d.camel@gmail.com> <9533cfc8-b822-edc0-67ac-7e2c9aeacb09@philipmcgrath.com> <87r1a7118r.fsf@ngyro.com> <41461d4f-5e7d-d9be-51c4-7a58c4f7570f@philipmcgrath.com> <06bf9af2-5c6c-54c1-1e2e-a652791a6747@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=1640283188; 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=+D6IBvQk5QF5+IAygNEQMwWqxV+DionxiMrb/daSE28=; b=dLsbnZlPZKV2GtayCcyj5DJycRcHOTa42m0Obs5R3pK11OQV8r1cGeJ2SQNfFXHEyGI2AO 3ro06QKrhGc0fZ8KIfcMAYehMG7vQ2THepkm8PMDeTpEHus/53Nyaz64O48tpujzL/ics7 y1fggoFKyd7icZzlDdtGZ3MNflib6RFs/ozc/cxMK0QG7GiqvtUGQ0klMAdp4gaUqZ4By2 T/AvJTn9io9RecRCIuVyxcPI+u9pE3/UtHui1DSgmB22pLgmd3nW0LQjgV07f5XASInRB9 mkp1o5ymLkxX0qVnzl5nDUtMrZnwhNYaszWibSiG+uJv9HiV2dRDpzjiw+/FyQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640283188; a=rsa-sha256; cv=none; b=KZfNllx+jb1UdCFNJqTyb2z2n8U6jiIL8qLbhvEOV7CRXO+GHHBLNcBOVYYvuH9OdUFLqX 6G/jXE7NHBALrTeC1xrGgYCCN+5JuEHTgzPynV64b8awraxYGpSPml6MRKOv2hP4xbf7Af xJTFfhXqo9Vsj9tci5T5l0kLwrtQAnM05Q+eiwmYBSga2YjQ+s4GAOWKAI68ZaTiG3aFX6 IIUyY2uAdQOPePPT9jP9CJaLrPrqeAqjAlWpBz8c1iHk27FoCJDLuJ6cb/+ooGyGvSgjh0 AupHcFWrXUKhQMJKTeKbzxEiuvVCEYMUeLhrLVsN+ScVdivh6JOLiin4aHMyUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ljgk3a63; 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.75 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ljgk3a63; 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: 9413699F5 X-Spam-Score: -2.75 X-Migadu-Scanner: scn0.migadu.com X-TUID: qE7bA6jB+GV7 Am Donnerstag, dem 23.12.2021 um 00:19 -0500 schrieb Philip McGrath: > On 12/21/21 15:44, Liliana Marie Prikler wrote: > > Am Dienstag, dem 21.12.2021 um 13:25 -0500 schrieb Philip McGrath: > > > Here are, to the best of my understanding, the differences in > > > representation among (guix build json) and the three versions of > > > guile-json packaged in Guix. > > I think the main difference between (guix build json) and guile- > > json here are the extended keys in the latter (guix only has > > strings) and the vector/object distinction. > > For guile-json-4, the representation of the JSON value "null" is also > different: #nil vs. the symbol 'null. Different, but configurable, i.e. you can make guile-json-4 return #nil, which is what would be needed for the sake of compatibility. > > > I think it'd be rather straight-forward to write upgrade guidelines > > in case we ever make the switch. Similarly, all rules based on > > pattern-matching *will break*, forcing us to upgrade all the > > recipes with it.  WDYT?  Would that be manageable (assuming the > > change to require Guile-JSON would already be core-updates > > material)? > > > > I actually might like (guix build json) better than guile-json-*! > Using vectors for arrays seems roughly awkward as tagged alists, > especially if Guile really doesn't have purely functional update > procedures for alists---and I sure can't find any---so we'd have to > write a little algebra of operations on JSON objects either way. But > I'm not really familiar with the pros and cons of each, and I don't > know the context behind the previous attempt to switch. I don't think there's been any. Note that Guix already uses guile- json, just not at build side. I don't think there's only one reason for this; of course we have the incompatibility, but guile-json would probably also pull in much more into the build than would be needed in most cases, so that's that. For the medium/long term I do think guile-json will eventually go the emacs-json route of making everything about its (de)serialization configurable, which ought to ease the porting of guix build to it. However, pointing at the API stability shield, I don't think we'll be too hasty porting things over. > My concern is that someone, or several someones, probably should know > all of that context before exposing one representation or another as > part of node-build-system's API. As I've said, I think that's a > high-priority improvement! But it, and designing nice helper > functions, seem quite far removed from the core purpose of this patch > series. You would only have to implement helper functions as needed, i.e. for now just (with-atomic-json-replacement proc) and (delete-dependencies json). My personal interpretation is that read-json/write-json are already public Guix API and you can easily use them inside node-build- system as-is (note: you do need to use-modules them, but it doesn't require building another module closure), but perhaps someone else has a different reading. As for other helper functions, that might become useful over time, those can be added as-needed. > Since IMO #:absent-dependencies would still be The Right Thing even > if those utilities already existed, and since #:absent-dependencies > can be implemented without having to resolve any of the broader > questions, I think it would be better not to entangle them with this > patch series. I agree, that we can both agree, that whatever we had in mind when starting this discussion can be implemented without these primitives, but I disagree on it being The Right Thing. Particularly, in the case of #:absent-dependencies, simplicity and completeness are lacking, whereas in my original suggestion correctness and completeness were lacking. For the record, I don't think we can get to The Right Thing without exposing the JSON somehow. However, since you argue we can't, we need to find a course of action, that will allow us to do The Right Thing later. I'm sadly a little out of options as I write this, but open to some suggestions and perhaps I'll get another idea if I gaze at my navel for some time. > Would it mitigate your concerns with #:absent-dependencies at all if > I send a separate patch series adding more general utilities based on > (guix build json)? That series would block this one in my opinion (aside from the node changes, that could be done without it, but we're talking five patches at most here and I plan to do them over the holidays). This would sound like a good idea if you could wait for that discussion to be resolved, but I fear that's not the case, is it? Cheers