(no subject)

Gary King <[email protected]>
Newsgroups gmane.lisp.cclan.general
Message-ID <[email protected]>
When the current ASDF removes a missing system, it doesn't tell you  
where it looked. For people that know ASDF that's not a big deal  
because they know to look at their *central-registry*. Newcomers,  
however, probably won't think to do that and may scurry about  
confused bothering the passers by. I'd like to add the following  
patch (which, I admit, isn't a thing of beauty). It causes a missing- 
component to display something like:

> ? (asdf:oos 'asdf:load-op 'bouncy-ball)
> > Error in process listener(1): Error component "bouncy-ball" not  
> found . Searched in:
> >                                 "user-home:darcs;asdf-systems;",
> >                                 "/repository/darcs/asdf-systems/",
> >                                 #P"/Users/gwking/.asdf-install- 
> dir/systems/",
> >                                 #P"/Users/gwking/.asdf-install- 
> dir/systems/site-systems/",
> >                                 "user-home:darcs;asdf-systems;",
> >                                 "user-home:.asdf-install- 
> dir;systems;",
> >                                 *DEFAULT-PATHNAME-DEFAULTS*
> > While executing: ASDF:FIND-SYSTEM
> > Type :POP to abort.
> Type :? for other options.
> 1 >

Here is the diff. Note that I moved *central-registry* up in the file  
so that it is defined when it is referenced in the missing- 
component's print-object.


> Index: asdf.lisp
> ===================================================================
> RCS file: /cvsroot/cclan/asdf/asdf.lisp,v
> retrieving revision 1.100
> diff -u -w -u -r1.100 asdf.lisp
> --- asdf.lisp   6 Jul 2006 02:25:59 -0000       1.100
> +++ asdf.lisp   6 Jul 2006 02:46:59 -0000
> @@ -121,6 +121,11 @@
>                                      (parse-integer v :start (1+ dot)
>                                                     :junk-allowed  
> t)))))
> +(defvar *central-registry*
> +  '(*default-pathname-defaults*
> +    #+nil "/home/dan/src/sourceforge/cclan/asdf/systems/"
> +    #+nil "telent:asdf;systems;"))
> +
> (defvar *compile-file-warnings-behaviour* :warn)
> (defvar *compile-file-failure-behaviour* #+sbcl :error #-sbcl :warn)
> @@ -218,11 +223,19 @@
> (defmethod print-object ((c missing-component) s)
>    (format s "~@<component ~S not found~
>               ~@[ or does not match version ~A~]~
> -             ~@[ in ~A~]~@:>"
> +             ~@[ in ~A~]~
> +             ~@[ ~A~]~@:>"
>           (missing-requires c)
>           (missing-version c)
>           (when (missing-parent c)
> -           (component-name (missing-parent c)))))
> +           (component-name (missing-parent c)))
> +          (search-strategy-description c)))
> +
> +(defmethod search-strategy-description ((c missing-component))
> +  (format nil ". Searched in: ~{~%  ~s~^, ~}" *central-registry*))
> +
> +(defmethod search-strategy-description ((c missing-dependency))
> +  (values nil))
> (defgeneric component-system (component)
>    (:documentation "Find the top-level system containing COMPONENT"))
> @@ -346,11 +359,6 @@
>    (some (lambda (x) (funcall x system))
>         *system-definition-search-functions*))
> -(defvar *central-registry*
> -  '(*default-pathname-defaults*
> -    #+nil "/home/dan/src/sourceforge/cclan/asdf/systems/"
> -    #+nil "telent:asdf;systems;"))
> -
> (defun sysdef-central-registry-search (system)
>    (let ((name (coerce-name system)))
>      (block nil
> cvs diff: Diffing debian

Whatchyathink?
-- 
Gary Warren King
metabang.com [http://www.metabang.com/]
(413) 210 7511 * (206) 338-4052 [Fax]
gwking on #lisp (occasionally)



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.