From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecZAA-0000A2-0A for guix-patches@gnu.org; Fri, 19 Jan 2018 11:05:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecZA6-00064n-Pm for guix-patches@gnu.org; Fri, 19 Jan 2018 11:05:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:55485) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ecZA6-00064I-N3 for guix-patches@gnu.org; Fri, 19 Jan 2018 11:05:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ecZA6-0003e8-96 for guix-patches@gnu.org; Fri, 19 Jan 2018 11:05:02 -0500 Subject: [bug#29928] [PATCH 0/5] Optimize profile hooks Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20180101103336.8613-1-iyzsong@member.fsf.org> <876088m2vd.fsf@gnu.org> <87vafxvrj7.fsf@member.fsf.org> Date: Fri, 19 Jan 2018 17:04:38 +0100 In-Reply-To: <87vafxvrj7.fsf@member.fsf.org> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Fri, 19 Jan 2018 22:42:36 +0800") Message-ID: <87o9lp3kdl.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 29928@debbugs.gnu.org Hi, iyzsong@member.fsf.org (=E5=AE=8B=E6=96=87=E6=AD=A6) skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: [...] >>> One drawback is 'guix package --dry-run' no longer report the derivatio= ns of >>> profile hooks, and the derivation of profile it reports is not the real= one. >>> Addition files will be built when the profiles hooks are run. >> >> FWIW I=E2=80=99m not entirely convinced by the approach. > > Well.. these patches modify package hooks to: > > 1. build all manifest inputs first. > > 2. filter manifest inputs to get interested ones. > > 3. run hook with its interested inputs. > > I think reducing the inputs of hook from the whole manifest to its > interested ones is the only way to avoid unneeded reruns. Agreed. >> As discussed earlier, I=E2=80=99d like to experiment with a notion of = =E2=80=9Cbuild >> rounds=E2=80=9D: the first round would build a profile without any hooks= , the >> second round would, depending on what the profile contains, rebuild it >> with certain hooks. > > I think "build rounds" would improve the UI/UX, and by changing inputs > from manifest inputs to a built profile, it would simply the current > implementations of profile hooks, but it won't avoid unneeded reruns > compare to the filtered interested inputs way. > > Is my understanding correct? A =E2=80=9Cbuild round=E2=80=9D is something that computes derivations base= d on the output of previously-built derivations. So it=E2=80=99s just another way to structure steps 1/2/3 above; it should not reduce expressivity. Build rounds would allow us to ensure that =E2=80=98build-derivations=E2=80= =99 is not called right in the middle of Guix, and is instead always under the control of the =E2=80=9Ctop level=E2=80=9D. Ludo=E2=80=99.