[asdf-devel] Package definition for each file in :components?

Matus Kmit simply.nitaai at gmail.com
Mon Jun 27 06:56:34 UTC 2011


Hi

i have some basic question:

Let's say, i have defined a system where with four files: system.asd,
packages.lisp, file1.lisp, file2.lisp, where file1 and file2 share the
same package and are split more or less only for better organisation
purpose.

So in packages.lisp i define only one package and use the respective
in-package expression for it in the beginning of the two files.
Besides that file1 should be loaded before file2.

In my asd file i have something like this:

(defsystem "system"
   :depends-on ("ext-system")
   :serial t
   :components ((:file "packages")
                        (:file "file1")
                        (:file "file2")))

Trying to load this system with (ql:quickload "system") i get an
error, that there is no package for file1. i discovered that when i
define a package for file1, although never use it, things work as i
want.

Does one have to define a package for each file listed in :components?
Is there some other, more suitable way to fulfil my purpose (use the
same package in both files?

Thanks for any help
Matus




More information about the asdf-devel mailing list