From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: (guix modules) and =?utf-8?Q?=E2=80=98source-module-closure?= =?utf-8?Q?=E2=80=99?= Date: Mon, 05 Sep 2016 23:24:12 +0200 Message-ID: <87twdut4zn.fsf@gnu.org> References: <8760qbi9qu.fsf@gnu.org> <87eg4yzmow.fsf@igalia.com> 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]:54737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bh1NN-0001s6-E5 for guix-devel@gnu.org; Mon, 05 Sep 2016 17:24:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bh1NI-0004Ge-9k for guix-devel@gnu.org; Mon, 05 Sep 2016 17:24:20 -0400 In-Reply-To: <87eg4yzmow.fsf@igalia.com> (Andy Wingo's message of "Mon, 05 Sep 2016 12:05:19 +0200") 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: Andy Wingo Cc: guix-devel Andy Wingo skribis: > On Mon 05 Sep 2016 10:13, Ricardo Wurmus w= rites: > >> Ah, very nice! >> >> Why is it necessary to read the file and parse the define-module >> expression? Does Guile not keep any of this information? Should it? >> Will something like this become part of Guile eventually? > > If you have the module loaded, there is "live-module-closure" which uses > the information Guile has at run-time. I guess Ludovic wanted to get > this information without loading the module, for some reason :) Exactly. Most of the time =E2=80=9Cbuild-side=E2=80=9D module are not load= ed in the Guile process that uses =E2=80=98with-imported-modules=E2=80=99. It=E2=80=99s a bit of hack but it=E2=80=99s necessary. Guile could provide= this functionality, but (guix modules) bakes in a few assumptions, notably that all the source files start with =E2=80=98define-module=E2=80=99. Ludo=E2=80=99.