Delivery question
I'm new to delivery of applications for LispWorks, so sorry if this seems like a silly question...
When my app uses several other packages, I'm finding myself "hacking" the delivery process to get it to work. Let me give a simple example, and perhaps that will help explain. I'm hoping someone can clue me in and let me know how to do what I want better. ;-)
;;; file MyPackage.lisp
(defpackage :my-package ...)
;; ...
(provide "MY-PACKAGE")
;;; file MyProgram.lisp
(use-package :my-package)
;; ...
Now, to-date, this has been fine for me since I've only been using the listener. I open my package, compile, open my program, compile, test away, and the world is good. However, when using delivery to compile, it fails:
(compile-file "mypackage.lisp" :load t)
(compile-file "myprogram.lisp" :load t)
It dies because myprogram.lisp shadows symbols declared in mypackage.lisp. I believe this is happening because when I compile the file in the editor, it's basically a glorified REPL (meaning it reads each expression one at a time), while COMPILE-FILE probably reads the entire file in one shot, then attempts to compile it. Because of this, my USE-PACKAGE call at the start of myprogram.lisp doesn't actually eval until *after* all the symbols have been interned. But that's just a guess right now.
My "hack" so far to get around this has been to insert (use-package :my-package) in between the calls to COMPILE-FILE in the delivery script. This works, but it feels like an unnecessary workaround due to my own ignorance right now.
Can anyone shed some light on what I should be doing?
Thanks!
Jeff M.