[Asdf-devel] Need to do uiop:setup-temporary-directory in image built with uiop

Robert P. Goldman rpgoldman at sift.info
Tue Jun 17 20:33:38 UTC 2014

Faré wrote:
> On Tue, Jun 17, 2014 at 2:51 PM, Robert P. Goldman <rpgoldman at sift.info> wrote:
>> Dave Cooper wrote:
>>> I think my issue is that I am not using the UIOP image dump facility.
>>> This is because in Allegro CL we use thei built-in excl functions like
>>> excl:generate-application --- it's not a matter of a generic dumplisp.
>>> So I'm pretty sure the solution is to call the
>>> register-image-restore-hook myself as part of e.g. the post-load-form of
>>> e.g. excl:generate-application. Longer term, maybe I can look into
>>> extending the UIOP image dump mechanism itself, to be able to use the
>>> different mechanisms in Allegro in addition to the generic excl:dumplisp.
>> You might also want to contact the Franz folks and warn them that ASDF
>> may corrupt images that they dump, and have them fix their
>> application-building and image-dumping facilities to avoid these problems.
>> Maybe Franz should extend their copy of the ASDF library to infiltrate
>> the image-handling process when they bundle it into ACL.
> Corrupt is a big word. Fail to implicitly call ASDF-defined image hooks.
> It is probably a bug that there isn't a uiop/stream:clear-temporary-directory
> that gets registered via uiop/configuration:register-clear-configuration-hook
> in uiop/configuration. I can do it, though I'd rather someone else do it.

I can do this, but I need some help understanding what's going on here.
 The following is a little circular:

  (defun clear-configuration ()
    "Call the functions in *CLEAR-CONFIGURATION-HOOK*"

What is the configuration?  ASDF has at least two configurations: the
configuration of source locations and the configuration of output-file
translations.  Is this one of those, or something else?  I'm a bit
confused because uiop/configuration.lisp looks like it provides a
*general* utility for configuring things.  And TEMPORARY-FILE is
something that is yet another aspect of configuration, outside both of

If you can provide me a bit of a directive, I'll try to fix this.

I assume that when I understand this, I'll be able to understand how to
test it.

> That said, even with that hook function defined and registered,
> you still need to explicitly (call-image-dump-hook)
> before you dump an image using implementation-specific tools, and
> you need to (call-image-restore-hook) when you restart.
>> I'd encourage you to do that, and CC me when you submit the bugreport to
>> Franz.
> I don't believe there's any Franz bug.
> It's a bug in how UIOP is not used properly.
> These hooks probably need to be documented better, too.

I don't agree.  If a lisp implementation ships with ASDF, and a lisp
image dumping facility, then to the maximum extent possible the lisp
image dumping facility should not require additional work on the user's
part.  Also, it's likely to make the implementation maintainers happier
if they don't have to get complaints from users about cryptic errors
from the combination of these two features.

Suggestion: if there are bits of configuration that can leak out of ASDF
and UIOP across image dumpings, let's try to document them, and make a
note for implementers that they may wish to appropriately modify their
image-dumping facilities to behave properly with their ASDF without
requiring additional user actions.

If worst comes to worst, and the implementors don't feel like handling
this, the documentation will be useful to the ASDF user who has to
handle it him or herself.

Follow-up question: is it getting to be time to add a separate manual
for UIOP?


More information about the asdf-devel mailing list