[GBBopen-developer] SWANK cannot load when using initiate.lisp

Chun Tian (binghe) binghe.lisp at gmail.com
Fri Apr 18 08:55:48 EDT 2008


Hi, Dan

Problems still exist. -_-

The symbol *AFTER-INIT-HOOK* is defined in SWANK package (cvs slime,  
not exist in slime 2.0) but SWANK-BACKEND, see line 181 of swank.lisp:

(in-package :swank)
.
.
.
(defvar *after-init-hook* '()
   "Hook run after user init files are loaded.")

In GBBopen's extended-repl.lisp, you define it into SWANK-BACKEND  
package. Since Clozure CL is very strict, this can cause another  
condition: (when I load swank before initialite.lisp)

 > Error: Name conflict detected by EXPORT :
 >        EXPORT'ing SWANK-BACKEND::*AFTER-INIT-HOOK* from  
#1=#<Package "SWANK-BACKEND"> would cause a name conflict with
 >        the present symbol SWANK::*AFTER-INIT-HOOK* in the package  
#<Package "SWANK">, which uses #1#.
 > While executing: EXPORT, in process listener(1).
 > Type :GO to continue, :POP to abort, :R for a list of available  
restarts.
 > If continued: Skip loading init file.
 > Type :? for other options.

So I suggest a patch to change all SWANK-BACKEND to SWANK in your  
extended-repl.lisp to get this worked, in attach.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ccl-fix.diff
Type: application/octet-stream
Size: 1410 bytes
Desc: not available
Url : http://GBBopen.org/pipermail/gbbopen-developer/attachments/20080418/110c130d/attachment.obj 
-------------- next part --------------



But this patch bring another issue: If you define the SWANK package  
first, the real swank package will not load because it detect the  
existence of swank package to decide whether load itself. So I must  
load SWANK before GBBopen's initialite.lisp to get SWANK load  
correctly. But, why should I load swank every time even when I don't  
need it ...

Still confused ... maybe you should NOT enable the extension-repl  
facility (and use a variable from swank package) when user do not load  
SWANK before GBBopen's initialite.lisp ...

Hope these notes can help you to find a best way to handle this issue.

--binghe

>
>> binghe at binghe-mac:~$ openmcl64 -n
>> Welcome to Clozure Common Lisp Version 1.1-r9177S (DarwinX8664)!
>> ? (in-package :swank)
>> > Error: There is no package named "SWANK" .
>
> Strange, I'm still seeing it with the latest checkout:
>
> > ccl -n
> Welcome to Clozure Common Lisp Version 1.1-r9178MS (DarwinX8664)!
> ? (find-package :swank)
> #<Package "SWANK">
> ?
>
> It appears that the :swank package is being retained through the  
> rebuild-ccl process--even with ccl invoked with the -n when doing  
> the rebuild-ccl.  Deleting the :swank package before doing the  
> rebuild-ccl fixes this:
>
> ccl -n
> Welcome to Clozure Common Lisp Version 1.1-r9178MS (DarwinX8664)!
> ? (find-package :swank)
> NIL
> ?
>
> I can only assume that the CCL image that I first downloaded and  
> used to create the latest CCL had the SLIME packages in it and that  
> they have been retained through all my rebuilds.  Good to know that  
> a CCL rebuild isn't truly fresh...
>
> -- Dan
>
>



More information about the GBBopen-developer mailing list