[Openmcl-devel] Coping with a name conflict
R. Matthew Emerson
rme at acm.org
Mon Mar 21 15:49:12 PDT 2022
It looks like I made a bad mistake when I made that custom IDE build.
The default package is the CCL package, rather than the CL-USER package, which is what it ought to be.
As a workaround, create ~/ccl-init.lisp, and put
> On Mar 21, 2022, at 2:00 PM, Denis Lorrain <dlo_lorrain at yahoo.fr> wrote:
> Hello all,
> - Having updated from macOS 11.6.3 to 12.3, I had to change from the old AppStore CCL 1.11.7 to CCL 1.12.1.
> - R. Matthew Emerson kindly gave me this last build:
> - Happily, CCL 1.12.1 runs seemingly very well with macOS 12.3, whereas CCL 1.11.7 was very problematic with macOS 11.6.3. So I'm globally very satisfied with both changes.
> - Unfortunately CCL 1.12.1 now introduces a name conflict with my own code, which did not occur before. Briefly summarized:
> Clozure Common Lisp Version 1.12.1 (v1.12.1-3-g2ae800e1) DarwinX8664
> For more information about CCL, please see http://ccl.clozure.com.
> CCL is free software. It is distributed under the terms of the Apache
> Licence, Version 2.0.
> ? (function DBG)
> #<Compiled-function DBG #x30000015DD1F>
> ? *package*
> #<Package "CCL">
> ? (find-symbol "DBG")
> ? (defmacro dbg (forme &optional fonction)
> (if fonction
> `(format *standard-output* "~4Tdbg-> ~S : ~S = ~S~%"
> (quote ,fonction) (quote ,forme) ,forme)
> `(format *standard-output* "~4Tdbg-> ~S = ~S~%" (quote ,forme) ,forme)))
> ; Warning: The function DBG is being redefined as a macro.
> ; While executing: (SETF MACRO-FUNCTION), in process Listener(4).
> ? (dbg a) => crash: AltConsole
> Lisp Breakpoint
> ? for help
> [nnnn] Clozure CL kernel debugger:
> - The conflict is created by my definition of dbg as a macro-function. You understand it's a simple developing help, inserted for debugging, checking things on the fly, printing internal values, etc.
> - The annoying point is that my dbg macro-function is everywhere in my code, sometimes commented out, but often not. I could change its name, but it would be quite tedious to edit all my source files, written over the last 15 or 20 years...
> => Is there some package trick which could solve this name conflict? So called shadowing? Unfortunately, my knowledge about packages doesn't extend further than the clumsy demo above.
> => Could anyone suggest a hopefully simple solution?
More information about the Openmcl-devel