[asdf-devel] clear-output-translations and saved cores

Faré fahree at gmail.com
Fri Jun 10 15:37:18 UTC 2011

On 10 June 2011 10:18, Robert Goldman <rpgoldman at sift.info> wrote:
> On 6/10/11 Jun 10 -8:55 AM, Raymond Toy wrote:
>> Xach brought this to my attention wrt to maxima, but it's not really
>> about maxima and asdf2.  My question is if clear-output-translations
>> should always be called before saving a core.  Is there a case where
>> you would not want to run c-o-t before saving a core?
>> If c-o-t should always be run, wouldn't it make sense for asdf2 to
>> arrange for that?  I'm not familar with how other lisps do this, but
>> cmucl does have *before-save-initializations* which is a list of
>> functions that are run before a core is saved.  Perhaps asdf2 should
>> push #'c-o-t onto *before-save-initializations*?
> I confess to not fully understanding the ramifications here.
> 1.  What would it mean for ASDF2 to arrange for the clearing of output
> translations when saving a core?  Is there some way to achieve that
> without ASDF2 having to incorporate code that would infiltrate every
> lisp implementation's core-dumping process?  Wouldn't it be better for
> the lisp implementations themselves to handle that?
> 2.  On the flip side, are we guaranteed that every lisp implementation's
> core-resuming facilities would cause the output translations to be
> reinitialized appropriately?

0- Actually, you don't want to (asdf:clear-output-translations),
  but instead to (asdf:clear-configuration),
  which will also take care of the source-registry,
  and any future configuration that may (hopefully not) be added.

1,2- If there were indeed a semi-standard protocol to clear things
  before image dumping, asdf should indeed probably register this function.
  However, there isn't, and I'm wary of doing the job
  on some implementations and not others, which will only encourage
  users to write sloppy code that works on one implementation and not others.

3- If someone writes a library to handle such things,
  this asdf cleanup would be a good thing to add there by default.
  I have vague plans to add such a capability to XCVB —
  and indeed XCVB allows you to run cleanup forms before to dump
  an executable — but with XCVB,
  this particular change doesn't matter so much, does it?
  [And I'm having trouble with how to do things in a way that
  make sense on image-linking Lisps such as ECL
  as well as image-dumping Lisps such as all the other ones.]

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
What you do today will cost you a day of your life.

More information about the asdf-devel mailing list