[Ecls-list] Strange things with packages

Geo Carncross geocar at gmail.com
Mon Dec 29 12:37:21 UTC 2008


On Sun, Dec 28, 2008 at 10:44 PM, David Creelman
<creelman.david at gmail.com>wrote:

> Hi,
> I'm working on a utility called cl-remind (git://
> github.com/kreely/cl-reminders.git)
> and I'm having a problem with a package using another package.
>
> my package defs look something like the following :-

[removed example code]

Don't do this.

The only thing that should go in your *.asd files are (defsystem) statements
(although you can wrap them in another dummy-package to make it possible to
gc packages). One of their (earliest) components is a lisp source which
creates the package.

Generally I do something like this:

(defpackage #:bogus-system (:use #:cl #:asdf))
(in-package #:bogus-system)
(defsystem bogus :name "bogus" :components ((:file "bogus")))

and put that in bogus.asd. Nothing else goes in there.

Then, in bogus.lisp, I've got (very early):

(defpackage #:bogus (:use #:cl ...) (:export #:sym1 #:sym2 ...))
(in-package #:bogus)
... #| code goes down here |#

Don't think of .asd files as code- just as data.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20081229/87b4e933/attachment.html>


More information about the ecl-devel mailing list