[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (guix modules) and ‘source-module-closure’
From: |
Ludovic Courtès |
Subject: |
Re: (guix modules) and ‘source-module-closure’ |
Date: |
Mon, 05 Sep 2016 23:24:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Andy Wingo <address@hidden> skribis:
> On Mon 05 Sep 2016 10:13, Ricardo Wurmus <address@hidden> writes:
>
>> 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 “build-side” module are not loaded in the
Guile process that uses ‘with-imported-modules’.
It’s a bit of hack but it’s necessary. Guile could provide this
functionality, but (guix modules) bakes in a few assumptions, notably
that all the source files start with ‘define-module’.
Ludo’.