[Asdf-devel] Questions about LOAD-SYSTEM & OPERATE

Faré fare at tunes.org
Sat Jul 5 16:45:50 UTC 2014


On Sat, Jul 5, 2014 at 11:57 AM, Robert P. Goldman <rpgoldman at sift.info> wrote:
> In the process of making a test for bug1335323, I discovered that the
> top-level call to look up the system in LOAD-SYSTEM/OPERATE, is
> FIND-COMPONENT, not FIND-SYSTEM, so that the
> REINITIALIZE-SOURCE-REGISTRY-AND-RETRY restart is not available.
>
Well, FIND-COMPONENT calls FIND-SYSTEM, and
if the failure happens there, the restart will be available, won't it?

> Also,
> for some reason, I am unable to find the "force1" subsystem of
> "test-asdf", although "test-asdf" is found correctly:
>
Works for me, from a fresh sbcl having loaded asdf.

>  1: (OPERATE LOAD-OP "test-asdf/force1")
>       2: (FIND-COMPONENT NIL "test-asdf/force1")
>         3: (FIND-COMPONENT "test-asdf/force1" NIL)
>           4: (FIND-SYSTEM "test-asdf/force1" NIL)
>             5: (FIND-SYSTEM "test-asdf" NIL)
>             5: FIND-SYSTEM returned #<PACKAGE-INFERRED-SYSTEM "test-asdf">
>             5: (FIND-SYSTEM "test-asdf" NIL)
>             5: FIND-SYSTEM returned #<PACKAGE-INFERRED-SYSTEM "test-asdf">
>           4: FIND-SYSTEM returned NIL
>         3: FIND-COMPONENT returned NIL
>       2: FIND-COMPONENT returned NIL
>
> Any idea why this is happening?  It's after an attempt to clear the ASDF
> cache, and I wonder if that's implicated -- maybe just smashing the
> *asdf-cache* isn't correct.  When I first call FIND-SYSTEM, I do find
> the system:
>
I don't know how and when you "smash the cache", but test-asdf/force1
is defined at the end of test-asdf.asd. Therefore, if you interrupt
the loading of this file after test-asdf itself was defined, you can
reach a point when test-asdf is defined but not test-asdf/force1. Or
maybe you somehow wiped part but not all of the *registered-systems* ?

> ; Registering #<SYSTEM "test-asdf/force1">
> Clearing the caches and finding.....
>
> I have pushed my bug1335323 topic branch to cl.net, since I could use
> some help with it, in case anyone has the time to examine it. (whoops.
> I can see now that I should be keeping the cache entries for ASDF, POIU,
> and their components; that's probably a bug, since if you are changing
> ASDF you're probably better off unwinding completely and starting over,
> instead of trying to handle an error)
>
Brief look:
* your clear-asdf-cache should probably use clrhash to preserve identity.
* it's probably unsafe to throw the entire cache in the middle of the build :-/
  maybe somehow the restart should be part of the
call-with-asdf-cache, not of find-system,
  and should have a different name than the current one.
  Also, once again, I suggest two restarts: one that just restarts and
lets you choose
  what to blow up or not, and one that blows up everything that makes sense.
  Maybe the two restarts are at a different place. Maybe the restart
that blows up the cache
  is actually in call-with-asdf-cache, which is safer.

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Once upon a time, there was a person whose life was so good
there was no story to tell about it.  — Foer




More information about the asdf-devel mailing list