From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0IMBLQo8VGHPIQAAgWs5BA (envelope-from ) for ; Wed, 29 Sep 2021 12:12:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id i4qRKAo8VGFoIQAAbx9fmQ (envelope-from ) for ; Wed, 29 Sep 2021 10:12:26 +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 2DB20E9B8 for ; Wed, 29 Sep 2021 12:12:26 +0200 (CEST) Received: from localhost ([::1]:34370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVWZd-0008Fi-98 for larch@yhetil.org; Wed, 29 Sep 2021 06:12:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVWYI-0006yb-LZ for guix-patches@gnu.org; Wed, 29 Sep 2021 06:11:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36271) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVWYI-0006zn-Ct for guix-patches@gnu.org; Wed, 29 Sep 2021 06:11:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVWYH-0005BA-TT for guix-patches@gnu.org; Wed, 29 Sep 2021 06:11:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50620] [PATCH 1/2] guix: packages: Document 'computed-origin-method'. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Sep 2021 10:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50620 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: Mark H Weaver , 50620@debbugs.gnu.org Received: via spool by 50620-submit@debbugs.gnu.org id=B50620.163291022719862 (code B ref 50620); Wed, 29 Sep 2021 10:11:01 +0000 Received: (at 50620) by debbugs.gnu.org; 29 Sep 2021 10:10:27 +0000 Received: from localhost ([127.0.0.1]:47817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVWXi-0005AI-HW for submit@debbugs.gnu.org; Wed, 29 Sep 2021 06:10:27 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVWXg-0005A3-Kg for 50620@debbugs.gnu.org; Wed, 29 Sep 2021 06:10:25 -0400 Received: by mail-wr1-f66.google.com with SMTP id u18so3296016wrg.5 for <50620@debbugs.gnu.org>; Wed, 29 Sep 2021 03:10:24 -0700 (PDT) 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=XQOdtInPXisiBJUv1EnNzVh3xPp+ZK7ywnP+8ifqnLc=; b=URIFUSF3dHaNHszusAp1fK4/pOwPjTQB7mth3LdVE35k0GMBKrKwPuP2vvhfFoK3gw KWxH/3VWE/zjqHIT7ShACkjxTp7IsgGRHfm1IegLjI+P2eJhyBnf+jVVFZbH4iMGmCbl JBxFxcDxelLvIQWKqlghbwu38bTmYj4CsPdw5TLS2yEDHMMvP1ntQJoQ9MLQfEzH789v U8xBmKWbTraelkJCZpixjWHKRJ0nDNKlhTKkRwHy+Anmd8cd5hubMB5HjGtQJi8Xz22b mf5M+3gSR+W076aCiFMQHB1pln3+3O1BBBopdQpqfKcHqh333bfdGWSorDS4h08Yz7qF LNAg== 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=XQOdtInPXisiBJUv1EnNzVh3xPp+ZK7ywnP+8ifqnLc=; b=cGzrWumYXp7iUV3BFC1ZaLJ093Ry7VhlCY80jf2VZdFpu8AIN+O+u5wnUWd7XTdMdW Bdo2NVCxA2ZUqbLwNszCDCgcHH9Z2wim6vlpGiOKfsotjo27rht14deStCPHENjaXc5U easa2xqIlVmvbBZajAlQ2JjAUFJ6s3hvZ0rYRVES2MUqb+Jy/BdvYJJ3vT4kZdwnwPlY XSoR1s0ngTe2jsor3FCGk+uKQtKKxPsYTsgMzSLBTdWgFjkBQrA5QeAk/aQqCpOKIjH7 ZxUMioJl9f34J/HBeAwWb0Bqc1ocqhMUq9ZPOgJs9f9VtA7q4bLM2WyEb9Lry8hRFhfL 5mSA== X-Gm-Message-State: AOAM533JSFHapZHdJngWtuvzizwrEP3V+7rijVfF+63YimnAW56+aTcL npyIhR/mPREnkDe5+7aOaCc= X-Google-Smtp-Source: ABdhPJyjXC5ATWEL21/sFreiPf+0UtE8yzatEBcG+zutZQrvWBiH0x/lWr6Zrq4vaHplIV4XjK/Adg== X-Received: by 2002:a5d:6644:: with SMTP id f4mr5769222wrw.231.1632910218551; Wed, 29 Sep 2021 03:10:18 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id d24sm1093899wmb.35.2021.09.29.03.10.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 03:10:18 -0700 (PDT) Message-ID: <56dcce10a751153d89f515028cd18c9125f6b84f.camel@gmail.com> From: Liliana Marie Prikler Date: Wed, 29 Sep 2021 12:10:16 +0200 In-Reply-To: References: <20210916114734.2686426-1-zimon.toutoune@gmail.com> <9b6ee27ff10e1042a5d61d0f93d957cf760e9ecb.camel@gmail.com> <87v930ay5y.fsf@netris.org> <87pmstghx0.fsf@netris.org> <1803ff0456849f456c6994d47cbe50d1a8ff6a09.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632910346; 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=XQOdtInPXisiBJUv1EnNzVh3xPp+ZK7ywnP+8ifqnLc=; b=CzwirQqzEP21OQ/OaIDdqCpaKEhQpyGaVTY02UD/C3gWJcNTa/SxrI/GkSCwJoQZHrju1W R+AFEGT3AIzmYmL+MQ/8qBnYKYR+lg/hACCJgjobQ8K8bzTwQ90VkgQ3nGxICtAgdkzvcL xK9cpVNkwYO2F7DqrmLh8gQ+fZm/u8i7mCNB669dEklt8t+u3zqSCOgntk8c5k1w1ogAlL TiImwS1hNpBnFkw/VijUAPZyrpV9zsfDSLn7oOHee3peXOU4roK25+YBRAs5/SI5DWVc9u M+WA7fic5z0CFhmq9XkHNWl74luHifdH1g7Uzk3gx31TgawqBxRKyCbgLFaqqQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632910346; a=rsa-sha256; cv=none; b=S2+RbAXSAywqPRAAqdXPTF+biAo7sE4sljtWYLxzvv7NpnrwSCHj0Jy219WX5Hg/tre88x nLG/Dr75gucDAgwxXsKPOpmBCR+s29YtMMoVH5jpK3y8dyEu+f+9s9foZeC3kPsiv06yBz 0xFd9kWjtEO9VPfTcTOjwvoPbh4KBpUewks3YwW31jSlELZialYmkbCwEjZ0AAohY9hs94 sDSBhSvxYjVTt/uDtSwTwVnVl2/iabmvOfkugzQm8IyyblCOxRQftXccg1n/TR9Uj3kh7C Cx724PUCxiXd3Hhril9yl9dkE3X/zAjc4whPlGaGngoyo6KkAfOf4favoNfj0A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=URIFUSF3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.70 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=URIFUSF3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 2DB20E9B8 X-Spam-Score: -1.70 X-Migadu-Scanner: scn1.migadu.com X-TUID: +WS+rVEQtwC4 Hi, Am Mittwoch, den 29.09.2021, 10:32 +0200 schrieb zimoun: > Hi, > > On Tue, 28 Sept 2021 at 19:24, Liliana Marie Prikler > wrote: > > > > Ok. I do not find it better than (guix packages) where 'origin' > > > is > > > defined but anyway. > > > I will send a v2 considering this and the rename you proposed. > > > > By that logic all of (guix git-download), (guix svn-download), etc. > > could be inlined there as well. Obviously that's a bad idea, but > > *why* is it a bad idea? I'd argue it's because we have a clear > > separation of the record descriptor for an origin and the ways it > > can be computed (the former in (guix packages), the latter > > elsewhere) and that it's good to keep those concerns separate. > > > > I also personally find the name "computed-origin" to be somewhat > > weird naming choice. I could just as well write the entire source > > code for some given package in the snippet part of an origin, > > perhaps applying some weird tricks in the category of Kolmogorov > > code golf – would that origin not be computed? > > Are we bikeshedding here? ;-) > > Again, the aim of this patch it not to fix the > 'computed-origin-method'. The aim of this patch is to improve the > readibility of the patch#50515 [1] which allows linux-libre and > icecat to be ingested by SWH from 'guix.gnu.org/sources.json'. > > Maybe there is an original issue with 'computed-origin-method', as > Mark explained [0]. But that's another story than the SWH and > sources.json one! Perhaps we're bikeshedding, but you started to shed the bike when you chose to move this procedure to (guix packages) rather than implementing one of Mark's suggestions in [0]. I do think we should allow for bikeshedding comments from both sides if that is the case. > [...] > > > > > it, but my main issue is that we still need to hide it! This > > > > will > > > > cause other channels to refer to it using @@ or roll their own > > > > implementations. > > > > > > This patch is not about discussing if this method should be > > > public or > > > not. It is private. Please discuss that elsewhere. > > > > > > Mark commented in [0]: > > > > > > --8<---------------cut here---------------start------------->8--- > > > The reason 'computed-origin-method' is not exported is because it > > > never went through the review process that such a radical new > > > capability in Guix should go through before becoming part of it's > > > public API. > > > --8<---------------cut here---------------end--------------->8--- > > > > > > and this patch is about improving the situation (by removing the > > > code > > > duplication). That's all. The aim of this improvement is > > > related to > > > saving these IceCat and Linux Libre packages by Software Heritage > > > [1]. > > > > I don't think delaying this review is a good idea, though. When > > you're removing code duplication, you ought to do it in a way that > > all duplicated code can indeed be removed, at least in my > > opinion. As-is this patch just invites practises otherwise > > discouraged by Guix. > > If you go this road, please push patch#50515 [1] as-is. It perfectly > works and fixes the issue with 'guix.gnu.org/sources.json' and SWH. > This current patch#50620 is a way to improve the readibility of > patch#50515 but then reading all this discussion I miss why > patch#50620 is thus a blocker for patch#50515. Because I feel we are > entering into the famous "Bigger problem" from xkcd. ;-) I don't think #50515 is "perfect as-is", though. Mark's (1) suggestion was to put computed-origin-method into its own module, which is the same as my long-term position. Mark suggested a short-term fix (2) of still comparing by eq?, which I believe you dismissed for the wrong reasons. Yes, you would still need to check the promise, but you wouldn't invert said check, i.e. you would still first look for the method and then assert that the uri makes sense. I think it is safer to err on the side of conservatism here rather than claim that this code will work for future computed-origin-esque methods. Instead of doing either (1) or (2), you opted for your own solution (3), which is to put this method into (guix packages). In my personal opinion, this is a half-baked solution, because it puts computed- origin-method into the (guix ...) without addressing any of the more fundamental issues raised by Mark. If you really, really can't put this into its own module, then I'd at least suggest (3a), which is to put it into (gnu packages) instead. That way, the definition is at least closer to where it's used and it's clearer that it's a hack to package certain things, not a core part of Guix. Perhaps you can even make use of it without needing to rebuild the guix package in [2/2], but don't quote me on that. > Patch#50515 is the first part of a concrete answer to > > and < > https://lists.gnu.org/archive/html/guix-devel/2021-09/msg00290.html>; > . > It is discussed to use SWH for such situations but today our > linux-libre is not ingested by SWH. Therefore, let first ingest > it--which does patch#50515. > > All the best, > simon > > PS: I disagree with your last statement. Because I am in favour for > incremental improvements and not "The Right Thing or > nothing". That's out of scope of the patch at hand. ;-) Perhaps you are right in that we can't wait for a lengthy discussion of whether computed-origin-method can be public (guix) API or not. Either way, it does not look as though this thread attracts enough attention to that issue, which is why we can ignore Mark's option (1) for now. For the right amount of incremental change, I'd suggest the following: Try to see whether you can do with computed-origin-method in (gnu packages) and without rebuilding the guix package, and if so, submit a v2 to #50515, which implements that. Otherwise, submit a v2 to #50515 that implements Mark's option (2). If you are also interested in the more long-term discussion of allowing computed origins into the (guix) tree, I suggest sending a v2 patch to this thread, which creates a new module, adds documentation, and so on, and so forth, and also link to it on guix-devel. For the time being, this v2 should also refrain from touching anything that uses the current computed-origin-method, as that can be addressed in rather simple follow-up commits, particularly if we also implement a #50515-v2 before. Then we can fully use this to bikeshed about making it a verb and what not. WDYT?