Skip to content

Commit

Permalink
Fix initite loop when the system is unknown to ASDF yet.
Browse files Browse the repository at this point in the history
  • Loading branch information
svetlyak40wt committed Mar 11, 2024
1 parent 55758c8 commit b8488f8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/utils.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
(labels ((recurse (system)
(typecase system
((or string symbol)
(recurse (asdf:registered-system system)))
(let ((found-system (asdf:registered-system system)))
(unless found-system
(error "Unable to find system \"~A\". Try to load it using ASDF or Quicklisp."
system))
(recurse found-system)))

(asdf:system
(loop for item in (asdf:system-depends-on system)
Expand All @@ -60,14 +64,14 @@
when (and real-item
(not seen)
(asdf/system:primary-system-p real-item))
do (pushnew real-item results
:test #'string=)
do (pushnew real-item results
:test #'string=)
when (and real-item
(not seen)
(or all
(not (asdf/system:primary-system-p real-item))))
do (push real-item visited)
(recurse real-item))))))
do (push real-item visited)
(recurse real-item))))))
(recurse system)
(values (sort results
#'string<)))))
Expand Down

0 comments on commit b8488f8

Please sign in to comment.