From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecsdt-0006L0-S6 for guix-patches@gnu.org; Sat, 20 Jan 2018 07:53:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecsdp-0002qU-Uy for guix-patches@gnu.org; Sat, 20 Jan 2018 07:53:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:56004) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ecsdp-0002q5-SN for guix-patches@gnu.org; Sat, 20 Jan 2018 07:53:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ecsdp-00041O-JE for guix-patches@gnu.org; Sat, 20 Jan 2018 07:53:01 -0500 Subject: [bug#29928] [PATCH 0/5] Optimize profile hooks Resent-Message-ID: From: iyzsong@member.fsf.org (=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?=) References: <20180101103336.8613-1-iyzsong@member.fsf.org> <876088m2vd.fsf@gnu.org> <87vafxvrj7.fsf@member.fsf.org> <87o9lp3kdl.fsf@gnu.org> Date: Sat, 20 Jan 2018 20:52:26 +0800 In-Reply-To: <87o9lp3kdl.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 19 Jan 2018 17:04:38 +0100") Message-ID: <87wp0cvgj9.fsf@member.fsf.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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 29928@debbugs.gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) writes: > 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 derivati= ons of >>>> profile hooks, and the derivation of profile it reports is not the rea= l 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 hook= s, 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 ba= sed 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. > I see, looking forward it, thanks!