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 qGBzGu9URGHVowAAgWs5BA (envelope-from ) for ; Fri, 17 Sep 2021 10:42: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 mp1 with LMTPS id GGH9Fe9URGEoYQAAbx9fmQ (envelope-from ) for ; Fri, 17 Sep 2021 08:42: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 C2F8CE4B9 for ; Fri, 17 Sep 2021 10:42:22 +0200 (CEST) Received: from localhost ([::1]:48418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mR9Rt-0003ha-Pm for larch@yhetil.org; Fri, 17 Sep 2021 04:42:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mR9Rb-0003O9-Mf for guix-patches@gnu.org; Fri, 17 Sep 2021 04:42:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46909) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mR9Rb-0004x9-Es for guix-patches@gnu.org; Fri, 17 Sep 2021 04:42:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mR9Ra-0002HC-4B for guix-patches@gnu.org; Fri, 17 Sep 2021 04:42:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50620] [PATCH 1/2] guix: packages: Document 'computed-origin-method'. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 17 Sep 2021 08:42: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: Mark H Weaver Cc: Liliana Marie Prikler , 50620@debbugs.gnu.org Received: via spool by 50620-submit@debbugs.gnu.org id=B50620.16318680838702 (code B ref 50620); Fri, 17 Sep 2021 08:42:02 +0000 Received: (at 50620) by debbugs.gnu.org; 17 Sep 2021 08:41:23 +0000 Received: from localhost ([127.0.0.1]:58455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mR9Qx-0002GI-Ff for submit@debbugs.gnu.org; Fri, 17 Sep 2021 04:41:23 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:44977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mR9Qs-0002Fx-3G for 50620@debbugs.gnu.org; Fri, 17 Sep 2021 04:41:22 -0400 Received: by mail-qk1-f175.google.com with SMTP id c10so15118553qko.11 for <50620@debbugs.gnu.org>; Fri, 17 Sep 2021 01:41:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3/IKjJ8ZTRdBg3zthUy35V8SYvOIJhiExKuYnmw30i0=; b=AQOf0M+Lhqd5z4Fx9B2tHmOyRIEbKjSTAaHvvqGOkT5YgZTZRY1CFnzmNOT7OJYz+Y fdffioyBTqM+HnbM884ExkHD74vmKudsRbTlDmqDFatYNE0oPuJM6IARKzmrYDAyxWqv JWbzxGibzQufIxLW+BOSBt3gqBdKKeaj+XMRGiRiIyIX0QC5IY41OZu8uaFsQQHZ3AkA qeZdZpeFyJ+hS6x/fHvOGqJEVpYMoLpVhn2C+rBn6SrIAkuWAoP+cxCQNmAyIpbUE10s Bq16Lr0bzjKhwXGplOS9jTegN+K5xU4Ujfa3jKJ9451iEkmg+abEqtSRGuLuGjX779r5 EoOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3/IKjJ8ZTRdBg3zthUy35V8SYvOIJhiExKuYnmw30i0=; b=5Vbgn5JXsjKl/kn/o//Ua1aj95NjClf/yj/ypeVJrWOyD/7+BZ6ZNj8pZb2ebxYW+J 4weGQfLJFpiIhreqeGWe6N771AsIekiah3dcJpzPJl8E0uT6vlM+iG5JDvUvHU+h0hLe Z4gfUc0NIP/RhEd4OyGlsqzEKxXhIOb9guG/T0krkSB3CR2REUUsD5VPQmYa2UGvP6h9 ZfNQhZQyoEwqpurLfffMf2Ii0LghZiMH25o/WEe7kGxUC730dYpnNb754NkfH2aBnMRI en444x1c2GmEziMs7JMHCvMA9DHKUQw5dVbXp/DFlG2rkKHZikZufhCSk8qM2plyqp7U WcuQ== X-Gm-Message-State: AOAM530TeNGPYT32Lz1cbPbc41Bj//Yop5bXBdOKbdfN5U8DRSVkhqMY axMhMw2t0Y351m+w8ncVExLvBEUgWevu0EWJUtc= X-Google-Smtp-Source: ABdhPJzRpxDrhfl2poy15o6KBUgDOCuJ98zUZHB+HnqVcPgeR9nXZUTL39XZb8lGjp9AhmPk5tbSxuFFS1c6Fy86zkQ= X-Received: by 2002:a37:a3cd:: with SMTP id m196mr9341312qke.253.1631868072343; Fri, 17 Sep 2021 01:41:12 -0700 (PDT) MIME-Version: 1.0 References: <20210916114734.2686426-1-zimon.toutoune@gmail.com> <9b6ee27ff10e1042a5d61d0f93d957cf760e9ecb.camel@gmail.com> <87v930ay5y.fsf@netris.org> In-Reply-To: <87v930ay5y.fsf@netris.org> From: zimoun Date: Fri, 17 Sep 2021 10:41:01 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" 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=1631868142; 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: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=3/IKjJ8ZTRdBg3zthUy35V8SYvOIJhiExKuYnmw30i0=; b=s7OnuwZzhbSYVk1rYkPURHfCozLuQhzIo5JySsDYeKXMmKkjMQMsYhCvf3zVsreJ5j2AIQ Ca1xvtG3WyAEV5QUZ0fuaia9DlfarFU3Dyq3PCps8l1mnmJyF96RQ6LN75tLaAjb6hGu5X IzzLMO0ShtpX1DXV5dY7MV89yFnUTNfrYDdH6B/1Z141Nz6Eb8ed4ibeSvqCmNPufJmPkB gslswORcPzAwG9TwoHZ2SQVkBsixhM6IeJ4rmg4UgjEI5NTZzX3cLONoR9KWeKkGRQtK+4 rdL9mhniAjlSFhRELIQXyffsNi5Lfcj4WzHa/Qly37YJMXQ75Y3LHQ2JYA5xZA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631868142; a=rsa-sha256; cv=none; b=uLFU5ZxGqsALaNySPDHENf3iqE1krzhcIcUEZD5PpTnY2Az/KQbPtAm1z2Uz4XBlcKG8Oz gLZ6xEL6UlBvPraDrc7TKvltcrzq46Hw+45N9JuiKVvhYVTN2ffWv0Sj//ht0Xe6+FA5zS jqFg/6MnUV67VagFCwOsRuE0buk4QQp/TimV9byNbpXmYbem0W9uciWc4NQnA3+WXYGi4U sENfYHaY21H1J8jahfc3MjtxfVhJy2iKwJnEBNldJS7XSvWepaR1pUC40/ITChlXYNPip5 gFnWoGk29fGta5Sl+YjzAAWzVgVFkwvMvc1o6UkA055CvVS49JpsXOqIPtFHHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=AQOf0M+L; 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.29 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=AQOf0M+L; 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: C2F8CE4B9 X-Spam-Score: -1.29 X-Migadu-Scanner: scn0.migadu.com X-TUID: df8G4Lbn2n4i Hi Liliana and Mark, Thanks for the comments. On Fri, 17 Sept 2021 at 01:40, Mark H Weaver wrote: > Liliana Marie Prikler wrote: > > I think that rather than putting this into (guix packages) itself, we > > might want to put it into its own file like (guix computed-origins) and > > choose a method name that is actually a verb, similar to git-fetch or > > svn-fetch. Perhaps simply call it compute-origin? > > These suggestions sound fine to me, although I don't have a strong > opinion either way. I'm happy to leave these details to others to > decide. I do not have a strong opinion either. If no one comes with a better name, I will pick the suggested one. :-) There are only two hard things in Computer Science: cache invalidation and naming things. -- Internet > > If done this way, there'd be the benefit that modules with packages > > using this thing would have to explicitly request the presence of the > > symbol through their use-modules clauses. > > Actually, for better or worse, Guile's '@@' form does not require the > named module to be imported using 'use-modules', so I don't think this > benefit strictly exists as stated above. However, I agree that it's > good practice to list all imported modules in the '#:use-module' clauses > at the top of the file wherever possible [*], and that there may be some > benefit in declaring the use of 'computed-origins' at the top of each > file. I am not deeply familiar with Guile module. 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. Then if the function is not exported by the module, the '#:use-module' does not have an effect, right? In this case, does it make sense to put this in its own module? Initially, I put the '@@' right after the '#:use-module's but then I changed my mind; I do not remember why. Anyway, yeah it is better at the top. Cheers, simon