[slime-devel] Proof-of-concept Name-conflict resolution

Michael Weber michaelw+slime at foldr.org
Tue Aug 5 21:47:47 UTC 2008


Hi,

attached is a patch for name conflict resolution within SLIME (Zach  
Beane wrote about the issue quite some time ago: <http://xach.livejournal.com/96625.html 
 >).  The patch is not meant for immediate inclusion into SLIME, more  
as a request for feedback.

There are some rough edges in there:
* works only with SBCL at the moment.  In case of a name conflict,  
SBCL signals a condition which gives access to the set of conflicting  
symbols, and also provides a RESOLVE-CONFLICT restart which lets me  
choose programmatically which symbol to favor out of the conflicting  
ones.  Other Lisps provide different restarts to resolve conflicts,  
and after superficial looks they appear to be less amenable to  
programmatic use.

* works correctly only with *recent* SBCL (>= 1.0.19.15)

* In case of many conflicts (e.g., due to USEing a package), on top of  
the RESOLVE-CONFLICT restart one can build some automation: instead of  
ending up a zillion times in the debugger, I can choose to favor a  
package, and for the current request conflicts are resolved in favor  
of symbols from that package.  If no symbol of the chosen package is  
in conflict set, I'll end up in the debugger again.

I found this behavior quite pleasant to work with in everyday  
situations.

* this is currently realized as a contrib, however, some hooks are  
needed.  I think they are reasonable overall.  I provided them as  
separate patch (0001).

* eval-in-emacs is used to trigger the UI (minibuffer & history list--- 
works for me), which might not be ideal.


Cheers,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-More-intercession-options-for-user-code.patch
Type: application/octet-stream
Size: 2462 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20080805/5ea3d4fd/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Symbol-name-conflict-UI-SBCL-only.patch
Type: application/octet-stream
Size: 8438 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20080805/5ea3d4fd/attachment-0001.obj>


More information about the slime-devel mailing list