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 ms11 with LMTPS id qAHIC+ycSGC0fwAA0tVLHw (envelope-from ) for ; Wed, 10 Mar 2021 10:18:20 +0000 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 kIugB+ycSGDFBQAA1q6Kng (envelope-from ) for ; Wed, 10 Mar 2021 10:18:20 +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 736651869A for ; Wed, 10 Mar 2021 11:18:19 +0100 (CET) Received: from localhost ([::1]:56512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJvv0-0005lJ-Ef for larch@yhetil.org; Wed, 10 Mar 2021 05:18:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJvbN-00019U-AV for guix-devel@gnu.org; Wed, 10 Mar 2021 04:58:01 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58648) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJvbM-0007Zb-V6 for guix-devel@gnu.org; Wed, 10 Mar 2021 04:58:00 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48566 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lJvbJ-0001Eh-Qw; Wed, 10 Mar 2021 04:57:58 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: guix-devel@gnu.org, Mathieu Othacehe Subject: Re: 04/07: inferior: Break cached-channel-instance into two procedures. References: <20210310075017.12619.72665@vcs0.savannah.gnu.org> <20210310075020.83E6A211CF@vcs0.savannah.gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 20 =?utf-8?Q?Vent=C3=B4se?= an 229 de la =?utf-8?Q?R?= =?utf-8?Q?=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: Wed, 10 Mar 2021 10:57:56 +0100 In-Reply-To: <20210310075020.83E6A211CF@vcs0.savannah.gnu.org> (guix-commits@gnu.org's message of "Wed, 10 Mar 2021 02:50:20 -0500 (EST)") Message-ID: <871rcn72l7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615371499; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=wqYhnFiW1HgTMYEMAAax9TZoknKI1dlKWhud9zNzvUg=; b=uvPKT8/+NNksPzjrde7qlSoY0rl5ww9NuScGCX1BO3Z3HzfKAvlmFdofkf7ou0IH3SVF7s cO/rf2DcehrBe5YGsXOrL/sLw5oOJP1+lLcRx9vdSdAEJTcYRZ8/KcW1Y1iK5vK6oP6OLt h6OPtd9W2TmwmRFmzC0IBYtf2KZXrnD4VXJWNUdNMzVupDxSes3rpHJPhLx8wXgezbbj+H 81/w96fo5Htv4ACYxu7a5UCMjMeQ10QdvLmjfWrgpN7nO4XEV2HZt3fCzVxromeCfBbaXF UpodUkJhaGr8TCupexRp/o3kqP+m1PjyWU3pVNJ4J4fCpOE+3JiVsqHKS4mfJw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615371499; a=rsa-sha256; cv=none; b=pNyFyXMGqhqSWmka7A0K2Xw9si1Uua/SVqMSdw4NEjSY/ZJdCUtumFR4oNz9U3tOSbj/Pw IVQrloNM0wWzh97kIyb5e036hvsXczHhcP3Crb3uhsDibAhWYTARAZ5iCOJrdooBMq5L/C ZJZi+bj1q8aQTo4t80b0B00RpQXzdG0PnFC4zVsLtUX7FP0hs2XQlBayhNBq+LdNR2zCJh eQ+y0D2jbfEPQam8wyeO2QsFOQIpwZhTjHcgbFXHX0UpwR1Ieu0kAkdLv+d0krdvDWp8dp z9l7PaWsGMdjojcTdpK8YlMpjh47kbNyUFr64qgbGmxuXJ1e1RHqFJ31BqjNug== 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-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -2.89 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 736651869A X-Spam-Score: -2.89 X-Migadu-Scanner: scn0.migadu.com X-TUID: tVVQ3RNlllct Hi Mathieu! guix-commits@gnu.org skribis: > commit 7d63b775513e7049047222dbe403a4181f63828d > Author: Mathieu Othacehe > AuthorDate: Fri Mar 5 09:51:42 2021 +0100 > > inferior: Break cached-channel-instance into two procedures. >=20=20=20=20=20 > Break cached-channel-instance into two different procedures: > channels->cached-profile and instances->cached-profile operating resp= ectively > on channels and channels instances. >=20=20=20=20=20 > * guix/inferior.scm (cached-channel-instance): Rename it into ... > (cached-profile): ... this new procedure. > (channels->cached-profile, instances->cached-profile): New procedures. > * guix/scripts/time-machine.scm (guix-time-machine): Adapt accordingl= y. [...] > -(define* (cached-channel-instance store > - channels > - #:key > - (authenticate? #t) > - (cache-directory (%inferior-cache-dire= ctory)) > - (ttl (* 3600 24 30))) > - "Return a directory containing a guix filetree defined by CHANNELS, a = list of channels. > -The directory is a subdirectory of CACHE-DIRECTORY, where entries can be= reclaimed after TTL seconds. > -This procedure opens a new connection to the build daemon. AUTHENTICATE? > -determines whether CHANNELS are authenticated." > - (define commits > - ;; Since computing the instances of CHANNELS is I/O-intensive, use a > - ;; cheaper way to get the commit list of CHANNELS. This limits over= head > - ;; to the minimum in case of a cache hit. > - (map channel-full-commit channels)) > - > +(define* (cached-profile store instances > + #:key > + cache-directory > + commits ttl) > + "Return a directory containing a guix filetree defined by INSTANCES, a > +procedure returning a list of channel instances. The directory is a > +subdirectory of CACHE-DIRECTORY, where entries can be reclaimed after TTL > +seconds. This procedure opens a new connection to the build daemon." We need to keep =E2=80=98cached-channel-instance=E2=80=99 because it=E2=80= =99s part of the public API and used outside Guix (in Guix-Jupyter at least). We can use =E2=80=98define-deprecated=E2=80=99. Also, I think =E2=80=98cached-profile=E2=80=99 doesn=E2=80=99t quite captur= e what this is about. :-) The docstring should mention what COMMITS is. The fact that INSTANCES is a thunk is a bit awkward and IMO not great for a public interface. WDYT? Thanks, Ludo=E2=80=99.