From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 28 13:24:49 2021 Received: (at 50620) by debbugs.gnu.org; 28 Sep 2021 17:24:49 +0000 Received: from localhost ([127.0.0.1]:46897 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVGqX-0000to-BD for submit@debbugs.gnu.org; Tue, 28 Sep 2021 13:24:49 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33331) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVGqG-0000tJ-4W for 50620@debbugs.gnu.org; Tue, 28 Sep 2021 13:24:48 -0400 Received: by mail-wr1-f68.google.com with SMTP id t18so59396585wrb.0 for <50620@debbugs.gnu.org>; Tue, 28 Sep 2021 10:24:32 -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=EDxsHEkx+GqjQsz0OfVCyb49nKdEAykkCk6RzT1yE8E=; b=K0vs7E6GcKktJvdy8YRDVHT9wVIrvzAF816Rl2wH8IXxVixkNRTALxUvvCT7jjbiZ1 3eKC8JesMBVr0ACjvCde6aEU52oChqWyxiFu1Tp1oFf88elbZiqjRtmKkeqqYFnhXsPK AgzfsafgN4SyEksLcrXLPuATPiM0vpUZKzJpEEi9Xr+DVDSufdPWnByrbwJGMA26LpeZ i3E+Fp7gbP9oV0NxR6sjgbuvhuhmow4779+QYvbx9FTBapLiMWerRGNFjcFtVMWFQqJ8 Tnl/8ybykREMs5Wx+CEVBUN8kRUa+B2pt6XG1GQCgb+o3QipOOLI9Sf230L6ZUY1HwSa eUtA== 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=EDxsHEkx+GqjQsz0OfVCyb49nKdEAykkCk6RzT1yE8E=; b=SdmzIHdfecvvjjvi+yaLifAO4EHinl3d+F7EPRGLIYckFVlzGMg5aEVGKaiccbV9nt NjTQccfQTftiCG9xIIY4r6sBcKpt7PC8d8sqoGEdYigPh8iAlFm+eqkvlfMOMIX2i4T9 fLQxE1jBchDd6xWBjtuUHA9RyMAZY25vbYFcWkniLaFS+xXEDF/qhgHOwt/d8iiq4tCv AMQXc7AszfuLtXBd6FOGBWIG2F5mSO1ASBdurXA16aBUzcgNWU+OeZs4u6o/NTo8lZa9 zGEDuzIB0w2Z6f/tmnxGMM/jbm40NL6Ssqq07rFZA7D6LHtlAojR09gh75+qojWfzccd gspw== X-Gm-Message-State: AOAM532uYfAo8ielQZhagfQlazqgFcG+XdWhr71MJUyw8WoNEaEhnO/p NJEQ+HwkzLzm3CK9z8n8hJw= X-Google-Smtp-Source: ABdhPJw4ndjhATBwy7RQihOwxv373GsjDRb/hjfMPVnaAYAVRwQA5a31NcYAmLolDL1eW9C+umacTQ== X-Received: by 2002:adf:ea45:: with SMTP id j5mr1498214wrn.291.1632849865321; Tue, 28 Sep 2021 10:24:25 -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 t126sm3266346wma.4.2021.09.28.10.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 10:24:24 -0700 (PDT) Message-ID: <1803ff0456849f456c6994d47cbe50d1a8ff6a09.camel@gmail.com> Subject: Re: [PATCH 1/2] guix: packages: Document 'computed-origin-method'. From: Liliana Marie Prikler To: zimoun Date: Tue, 28 Sep 2021 19:24:23 +0200 In-Reply-To: References: <20210916114734.2686426-1-zimon.toutoune@gmail.com> <9b6ee27ff10e1042a5d61d0f93d957cf760e9ecb.camel@gmail.com> <87v930ay5y.fsf@netris.org> <87pmstghx0.fsf@netris.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50620 Cc: Mark H Weaver , 50620@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Am Dienstag, den 28.09.2021, 18:37 +0200 schrieb zimoun: > Hi, > > On Tue, 28 Sept 2021 at 18:01, Liliana Marie Prikler > wrote: > > > zimoun writes: > > > > I chose to put this in (guix packages) instead of its own > > > > module > > > > because the module would contain only one function and nothing > > > > exported. The aim for now, as discussed, is to not make this > > > > 'method' part of the public API. > > If so, one could argue that (gnu packages) is a better location to > > hide > > 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? > > 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. Cheers