From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SGSBGP+ZwWHO/QAAgWs5BA (envelope-from ) for ; Tue, 21 Dec 2021 10:10:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CLpHFP+ZwWHKFAAA1q6Kng (envelope-from ) for ; Tue, 21 Dec 2021 09:10: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 059AB2D369 for ; Tue, 21 Dec 2021 10:10:23 +0100 (CET) Received: from localhost ([::1]:46380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzbA5-0000Dc-M3 for larch@yhetil.org; Tue, 21 Dec 2021 04:10:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzb9n-0000Bc-9v for guix-patches@gnu.org; Tue, 21 Dec 2021 04:10:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzb9n-0008AY-1F for guix-patches@gnu.org; Tue, 21 Dec 2021 04:10:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mzb9m-00027F-Oa for guix-patches@gnu.org; Tue, 21 Dec 2021 04:10:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51307] [PATCH v2 3/3] scripts: hash: Add git serializer. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Dec 2021 09:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 51307-done@debbugs.gnu.org Received: via spool by 51307-done@debbugs.gnu.org id=D51307.16400777518064 (code D ref 51307); Tue, 21 Dec 2021 09:10:02 +0000 Received: (at 51307-done) by debbugs.gnu.org; 21 Dec 2021 09:09:11 +0000 Received: from localhost ([127.0.0.1]:52340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzb8x-000260-DC for submit@debbugs.gnu.org; Tue, 21 Dec 2021 04:09:11 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:58086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzb8v-00025m-M1 for 51307-done@debbugs.gnu.org; Tue, 21 Dec 2021 04:09:10 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 2E87C427; Tue, 21 Dec 2021 10:09:04 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O7ig1_s8_6Td; Tue, 21 Dec 2021 10:09:03 +0100 (CET) Received: from ribbon (unknown [IPv6:2001:660:6102:320:e120:2c8f:8909:cdfe]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 7D7611F7; Tue, 21 Dec 2021 10:09:02 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20211118002023.3323307-1-zimon.toutoune@gmail.com> <20211118002023.3323307-4-zimon.toutoune@gmail.com> <87bl1bjsxf.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 1 =?UTF-8?Q?Niv=C3=B4se?= an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 21 Dec 2021 10:09:01 +0100 In-Reply-To: (zimoun's message of "Mon, 20 Dec 2021 15:21:18 +0100") Message-ID: <87bl1ab9zm.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / X-Rspamd-Server: hera X-Rspamd-Queue-Id: 2E87C427 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] 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=1640077823; 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; bh=n6TNikj/23KuUZxiUF8vKfhmW/LzukmWzvYyv781pyk=; b=PsyoJwFf6f/v/nvfRcOx/93Pc3qbHXtD8NBu4Ge6XzhuRAg3qZvmJoQnC8hOWuz/qpC6xM Kxx8Cxv1g6lx5t0aFwuaa19BSXfbivDMFKV1wMMXtmdtzCjOTN/a+DgyqZpxcHvjjmymrg iS3RYB/gjkiOr+F6OW9K64LB0AtlbHQatquAP0gbvP7giFjFgMppgiEkdY5DnhjqobixGv 7G3jG0IHkuMl9WtJngL2tDQUNLc+pLfSI61l6txz/Fv8MdEq+yEmyuAboKYRi4jmPr8gGM /Myonozf+W+MuepooQlA1dYCHCrRBmO6luIOdUQBXiWEXQsj0fexDBjZoiy7VQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640077823; a=rsa-sha256; cv=none; b=N0NWxYeQh50S3MiWfchgIVEzvwOaGXYOYqYR0IY22XAkmEle+qi6MbjEml2U/7F+R79o/y 7JfZe+A7FF6X8PjR+umEI5NTV5MrPbQz9Sgfw+eNE9xrCSTqqqxjgme6VEExfHw8/a6p1i bAawcaxRKyOjpdVw0c8sIUnw9Cys/0udcu1cJkUI1EcHMSB71dmvMmfR18iFpvg3RdYFXk bD6HV8XWAnbiac3AYX5XdVda1rlxKE7OgolN9ETYAsEROcm7NDJNXFArcZ9B1rFigfC8JU DMqiYE9VxkbSiw+D32DK90TqBnfQ90OiHlkHIWBoiNUNOeQTGGBy2hSa/tgCWQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: -4.52 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 059AB2D369 X-Spam-Score: -4.52 X-Migadu-Scanner: scn0.migadu.com X-TUID: s6PmmGNXPTU0 Hi, zimoun skribis: > On Mon, 20 Dec 2021 at 14:40, Ludovic Court=C3=A8s wrote: > >> > + #:use-module ((disarchive git-hash) #:select (git-hash-file >> > + git-hash-directory)) >> >> Use #:autoload (that makes Disarchive a soft dependency and also reduces >> start-up time.) > > Thanks. As I asked in the cover-letter, these are confusing for me. > For instance, why not autoloading all the used modules? And is it > better to lazily load with something like: > > (match (and=3D> (resolve-module '(disarchive) #:ensure #f) > (lambda (disarchive) > (cons (module-ref disarchive '%disarchive-log-port) > (module-ref disarchive 'disarchive-assemble)))) > (#f (format #t "could not load Disarchive~%") > #f) > ((%disarchive-log-port . disarchive-assemble) > > ? From guix/build/download.scm, or any other "lazy reference" in the cod= e code. > > What are the differences? I have read the documentation but it is not > clear for me the difference between '#:autoload' and 'module-ref'. There are several reasons for autoloading: one is startup time/memory footprint, and another one is having =E2=80=9Csoft dependencies=E2=80=9D (y= ou can still build and use the thing when the dependency is missing; only that specific feature is unavailable.) Usually we=E2=80=99d use #:autoload, but in cases where we want full control over the process, as in the Disarchive snippet you show above, we=E2=80=99d= use the programmatic interface. There are also cases of =E2=80=9Clazy references=E2=80=9D where we use the = programmatic interface to load things at run time. This is used for instance to keep (guix =E2=80=A6) modules independent of (gnu =E2=80=A6) modules. I hope this sheds some light! >> I was wondering whether we should keep the deprecation warning for =E2= =80=98-r=E2=80=99; >> we might consider it a handy shorthand for =E2=80=98-S nar=E2=80=99? > > Ah, yes. Deprecate '--recursive' but keep '-r' as shorthand for '-S > nar'. LGTM. I=E2=80=99d treat =E2=80=98-r=E2=80=99 and =E2=80=98--recursive=E2=80=99 in= the same way, no? That is, keep them both without a deprecation warning, but document them as aliases for =E2=80=98-S nar=E2=80=99. WDYT? Thanks, Ludo=E2=80=99.