[CM] asdf and clm on sbcl

Ralf Mattes rm at seid-online.de
Wed Feb 15 10:13:42 PST 2017


On Wed, Feb 15, 2017 at 01:09:57PM -0500, Juan Reyes wrote:
> 
> Thanks a lot Ralf and Tito!
> 
> Looks like on plain SBCL we still need '(require :asdf)'
> '(find-package :asdf)' returns nil.

Oh dear, yes. Mine pulls it in via quicklisp (did I mention that
quicklisp is a livesaver ;-)

> '(in-package :asdf-user)' did the trick.

That's ugly. In general, *-user packages are meant for interactive 
REPL experimentation, not for written code.
It used to be the case that one would write:

(defpackage :clm-asdf (:use :cl :asdf))
(in-package :clm-asdf)

 ...

But that seemed so wrong for a file with purely delatative syntax (hint,
hint, looking atr you CM) that the gods of ASDF decided that none of
that trickery is needed. 
Just for the fun of it create foo.asd:

 (defsystem :foo
  :components ())

 (format *debug-io* "This is read in package ~A~%" *package*)

Then, do a (asdf:load-system :foo)

Nota bene: don't (load "foo.asd") - that would produce the error you
encountered.

> For what you guys are suggesting 'clm.asd' should look like:
> 
> (require :asdf)
> (in-package :asdf-user)
> (asdf:defsystem "clm"
>    :description "Common Lisp Music"
>    :version "5"
>    :author "William Schottstaedt <bil (at) ccmra (dot) stanford (dot) edu>"
>    :licence "LLGPL"
>    :perform (compile-op (o c)
> 	      (load (system-relative-pathname "clm" "all.lisp"))))
> 

I think this needs a bit of rework (pimp up my asd ...)

> > 
> > I forgot
> > 
> > (in-package :asdf-user)
> > 
> > at the beginning of clm.asd.
> > 
> > An example of ${HOME}/.sbclrc file:
> > 
> > (require :asdf)
> > 
> > (dolist (l (list '*default-pathname-defaults* #p"/path/to/clm/"))
> > (pushnew l asdf:*central-registry* :test #'equal))

 ... or install quicklisp and put/link your extra code/projects into
 ~/quicklisp/local-projects.

 Cheers, RalfD



More information about the Cmdist mailing list