[consfigurator] which package is *CONSFIG*

Yehouda Harpaz yeh at lispworks.com
Wed Dec 8 18:35:13 GMT 2021


>  Indeed, CL-USER has no *CONSFIG*.
>  
>  *CONSFIG* is meant to be an optional feature, and I pushed a change a
>  few days ago which is meant to prevent the sort of problem you
>  encountered, by altering the initform for the SYSTEMS slot.  Are you
>  running git master or the latest stable release?  Can you reproduce the
>  problem with git master?
>  

I am not actually using consfigurator, I am just testing it. Thefore I
don't need a speedy fix. 

I am testing the version that I loaded from quicklisp, which doesn't
have this fix yet. 

Looking at the fix in the sources:

1) I would make the init-form just a function call
      (get-default-systems)
  and then define GET-DEFAULT-SYSTEMS to what is the current the
  initform. Having such a large piece of code inside the defclass make
  it difficult to debug. 

2) Instead of the handler-case form, I would use something like:

    (let ((sym (find-symbol ...")))
       (when (boundp sym) (symbol-value sym)))

   that avoids a call to ERROR if the symbol is not bound. Even though
   the call to ERROR is caught, it is still not useful, because the
   system has to do some work before reaching teh point of deciding to
   throw out. It is also a problem for any kind of code that tries to
   record error calls even if they are caught. In addition, it is much more
   efficient code, because handler-case is quite a heavy machinary
   even when error is not invoked.

3) As far as I can see the test will give the warning, because nothing
    sets *package*, so it will be be CL-USER, or whatever the current
    package is when the test is executed). Also need to document in
    the documentation the requirement for *package* to be the same as
    in the call in-consfig.



More information about the sgo-software-discuss mailing list