-
Notifications
You must be signed in to change notification settings - Fork 0
/
quicklisp-fix.lisp
41 lines (38 loc) · 1.57 KB
/
quicklisp-fix.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#+quicklisp
(in-package #:quicklisp)
#+quicklisp
(defun compute-load-strategy (name)
(setf name (string-downcase name))
(let ((asdf-systems nil)
(quicklisp-systems nil)
(already-processed (make-hash-table :test 'equal)))
(labels ((recurse (name)
(setf (gethash name already-processed)
t)
(let ((asdf-system (asdf:find-system name nil))
(quicklisp-system (find-system name)))
(cond
(asdf-system
(push asdf-system asdf-systems))
(quicklisp-system
(push quicklisp-system quicklisp-systems)
(dolist (subname (required-systems quicklisp-system))
(unless (gethash subname already-processed)
(recurse subname))))
(t
(cond
((string-equal
(asdf:primary-system-name name)
name)
(cerror "Try again"
'system-not-found
:name name)
(recurse name))
(t
(recurse (asdf:primary-system-name name)))))))))
(with-consistent-dists
(recurse name)))
(make-instance 'load-strategy
:name name
:asdf-systems (remove-duplicates asdf-systems)
:quicklisp-systems (remove-duplicates quicklisp-systems))))