quicklisp-client
quicklisp-client copied to clipboard
ql-dist:dependency-tree signals no-applicable-method
On client 2014-01-30
dependency-tree expects calling ql-dist:find-system on an element of a system's required-systems to return a system object. This expectation is violated for at least "asdf", which leads to dependency-tree being called recursively on nil and signalling. Using asdf-finalizers as an example because it only has the one required system:
;(in-package ql-dist)
(required-systems (find-system "asdf-finalizers"))
("asdf")
;(in-package ql-dist)
(find-system "asdf")
NIL
;(in-package ql-dist)
(dependency-tree "asdf-finalizers")
There is no applicable method for the generic function:
#<STANDARD-GENERIC-FUNCTION DEPENDENCY-TREE #x3020008D131F>
when called with arguments:
(NIL)
[Condition of type CCL:NO-APPLICABLE-METHOD-EXISTS]
Restarts: [snip]
Backtrace:
0: (#<CCL::STANDARD-KERNEL-METHOD NO-APPLICABLE-METHOD (T)> #<STANDARD-GENERIC-FUN$
Locals:
CCL::GF = #<STANDARD-GENERIC-FUNCTION DEPENDENCY-TREE #x3020008D131F>
CCL::ARGS = (NIL)
1: (NIL #<Unknown Arguments>)
[No Locals]
2: ((:INTERNAL (DEPENDENCY-TREE (SYSTEM)))) Locals: #:G8125 = (NIL)
#:G8126 = (NIL)
#:G8129 = ("asdf")
#:G8127 = "asdf"
SYSTEM = #<SYSTEM asdf-finalizers / asdf-finalizers-20130615-git / quicklisp$
dependency-tree is meant only for objects of type ql-dist:system, not ASDF systems. It can't be used on projects not indexed within a dist (e.g. your own projects).
It could be fixed to catch that NIL error, though...
To be clear, the above error is signaled from a code path that uses a ql-dist:system (see frame 2 of the trace).
I suspect that the actual bug here is that "asdf" is allowed as a member of a ql system's required-systems, but (ql-dist:find-system "asdf") does not produce a system. I believe changing that would fix dependency-tree.
If that is actually intended, then would the ideal behavior of dependency-tree be to remove the questionable nodes from its output?
Ugh. That's an indexing issue. ASDF shouldn't be in depends-on lists. It doesn't make a lick of sense. I'll have to think about it a bit more.