PCL uses possibly-package-qualified symbol read syntax for some of the
objects it creates, in particular make-instance methods in
fast-init.lisp. Because package names are not immutable, renaming a
package means the objects belonging to the renamed package have
incorrect names and won't be found after the package is renamed.
I had thought that it would be possible to provide a workaround by
hooking rename-package in order to update method names. Scanning over
all symbols in *pcl-package* could be an acceptable, if not
satisfactory, kludge, if my assumption that rename-package isn't a
common operation is vaguely reasonable. (But what do I know?
Feedback on the possible uses and frequency of use of rename-package
gratefully received!) I've thought of something like scanning for the
pattern <old-package-name>::<symbol> and renaming found objects.
This is so kludgey and heuristic that, while it could fix the bug, it
may be worth looking at more graceful and less frightening
alternatives. It has been suggested that an elegant way to fix this
problem, while adding useful functionality to SBCL as a whole, would
be to extend the set of valid function names to include list-names,
such as is current practise for (setf foo). Then the method names
might be (make-instance <class-symbol> ...).
Initial hackery suggests that this approach is at least feasible,
since list-names for setf are already part of the system, so I'm
working on it. Since function naming affects many disparate areas of
any Lisp system, I would be very grateful for any hints of things to
check, such as interactions with trace, block names etc., which I'll
likely not think of otherwise.
Thanks for any comments,