From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yGTeJgNQU2E+WwEAgWs5BA (envelope-from ) for ; Tue, 28 Sep 2021 19:25:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mLOCIgNQU2HTBwAAB5/wlQ (envelope-from ) for ; Tue, 28 Sep 2021 17:25:23 +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 09487F2 for ; Tue, 28 Sep 2021 19:25:23 +0200 (CEST) Received: from localhost ([::1]:60894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVGr4-0004NC-0U for larch@yhetil.org; Tue, 28 Sep 2021 13:25:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVGql-0004Lo-4z for guix-patches@gnu.org; Tue, 28 Sep 2021 13:25:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35351) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVGqk-00053u-Tb for guix-patches@gnu.org; Tue, 28 Sep 2021 13:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVGqk-0000uK-H4 for guix-patches@gnu.org; Tue, 28 Sep 2021 13:25:02 -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: Tue, 28 Sep 2021 17:25:02 +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.16328498893465 (code B ref 50620); Tue, 28 Sep 2021 17:25:02 +0000 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> From: Liliana Marie Prikler 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-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=1632849923; 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=EDxsHEkx+GqjQsz0OfVCyb49nKdEAykkCk6RzT1yE8E=; b=iU/gQFG6I543cVA/8UN08RYVLxnShcw5W4km3zV6/yj96VfSxjQRgIEiLmAybXBzxgAkGb BoDGMXt3E2IMJaEri0gd14/ovWkZUlwCaA54a5QFKJhm8wrP4PKtVXguSMin7758eSrpzG k0wba58ytmtAnAuCkudq0fuufflg5EPhZTWnODmhgNwLU3vj/oAI2u8U278KyFE3DkLYgi RiOrCfOYrABOGh+uSDdMlX+RkP4FIwXO/oYQSSSf5H9W6AOSxsO5kdURBG2fF0QB2vH/4F aF4NXlnfi5MxNL5WMM6U/ZdnmHepXLJZ55Ck7Dvertjk6+nWmgG/n+qNNwpJqg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632849923; a=rsa-sha256; cv=none; b=DhtN/pjO2YCCSLZGxSnfAR8aBoyENcpAo6iHD0AdDTCvHajjJD/7IOToDXw9N8vUTKSpt9 gLvrrgfz1sRExcCoymn1q++kTaK90HZ9cQhcXGv4O1K8zIydYcWERUswuyEUxDduuZ69sG F0IVnEI//WXhqfdvUGSkrsCCX9CN5+6svjydevFiBCZ1RymhAoXZzpJfxzPECC8JZk+67u O16V0BvWd2135yJYKbIXcIEqXUjmrzcv25QXqDJpsrae/FTc0s0mx+CxQ77f629jWjd5IF Gp0wxIQkvKQwolmPyRVYPZOPsEhamjrVxtpe62RBtSoRBJeZS1R8WsrOKFLPMQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=K0vs7E6G; 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=K0vs7E6G; 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: 09487F2 X-Spam-Score: -1.70 X-Migadu-Scanner: scn1.migadu.com X-TUID: Ld5SAalGjtUz 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