From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: gexps and =?utf-8?Q?=E2=80=98with-imported-modules=E2=80=99?= Date: Mon, 04 Jul 2016 00:20:50 +0200 Message-ID: <87oa6ebby5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJpl6-0000hQ-34 for guix-devel@gnu.org; Sun, 03 Jul 2016 18:21:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJpl0-0004G0-TY for guix-devel@gnu.org; Sun, 03 Jul 2016 18:20:58 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJpl0-0004Fv-Q5 for guix-devel@gnu.org; Sun, 03 Jul 2016 18:20:54 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:40440 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bJpky-0006sI-Ur for guix-devel@gnu.org; Sun, 03 Jul 2016 18:20:53 -0400 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel Hello! The =E2=80=98wip-gexp-imported-modules=E2=80=99 branch changes gexps so tha= t each gexp embeds information about which modules need to be imported into its execution environment. Before you would do: (gexp->derivation "foo" #~(begin (use-modules (guix build utils)) =E2=80=A6) #:modules '((guix build utils))) to specify that (guix build utils) must be imported in the build environment of =E2=80=9Cfoo=E2=80=9D. After, it becomes: (gexp->derivation "foo" (with-imported-modules '((guix build utils)) #~(begin (use-modules (guix build utils)) =E2=80=A6))) The gain (not visible here) is that when you nest gexps, the outermost gexp now contains all the info about modules that need to be imported. That way, no side channel is needed to carry the imported module info (by =E2=80=9Cside channel=E2=80=9D, I mean things like the =E2=80=98importe= d-modules=E2=80=99 field currently found in and several other places.) Thus, it should be easier to compose gexps. I plan to merge it within a day or two. Comments welcome! Ludo=E2=80=99.