From: Pete Grant
Subject: Genera Package Bug
Date: 
Message-ID: <1992Feb29.133751.2955@pentagon-gw.army.mil>
For about six years now, Ive been plagued with an occasional bug that is giving
me the fits.  Symbolics couldn't come up with an answer (other than go read
about standard variables).  I just wondered if anyone out ther may have had the
same problem and has found a solution:

I define a system to be in its own package -- (defsystem .. :default-package foo
..).  In order to make that package current, I insert a top-level form into my
defsystem.lisp file (in-package foo).  I then compile the system, load it, and
save the world.  99% of the time theres no problem.  Its the other 1% thats
been giving me the fits.

All of a sudden, after a number of patches, I save another incremental world --
again, 99% OK -- then, suddenly, the machine is forced into package USER.  It
usually goes unnoticed until some function call is not recognized as the system
is looking for the function in package USER but its defined in package FOO. 
Worse yet!  Customer loads data and his loaded symbols get interned in USER
instead of FOO.

The simple solution is to type an IN-PACKAGE into the Lisp Listener but that
brings problems with users who go back and forth between other programs that
are in other packages.  For the same reason, I dont want to include that form 
in their lispm-init files.

I am not looking for ways to force the system back into  my package.  Im
looking for a way to prevent the system from going into USER in the first place.
 

Since this has happened to me on every large system Ive worked on, its fairly
good evidence that Im doing something wrong -- but what?  I dont have any
package changing forms in the patches, nor do I have any patch files in USER. 
The only way to get rid of this bug is to recompile the system.  I can't
pinpoint the phenomena to any one patch as the system indicates thats its in
FOO until I save the world.


A
Has anyone else experienced this problem?  Found a solution?  Care to share it?100