[slime-cvs] CVS slime/contrib

CVS User trittweiler trittweiler at common-lisp.net
Tue Dec 15 20:29:01 UTC 2009


Update of /project/slime/cvsroot/slime/contrib
In directory cl-net:/tmp/cvs-serv31302/contrib

Modified Files:
	ChangeLog swank-asdf.lisp 
Log Message:
	* swank-asdf.lisp (who-depends-on): Add.


--- /project/slime/cvsroot/slime/contrib/ChangeLog	2009/12/15 20:14:38	1.305
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2009/12/15 20:29:01	1.306
@@ -1,5 +1,9 @@
 2009-12-15  Tobias C. Rittweiler  <tcr at freebits.de>
 
+	* swank-asdf.lisp (who-depends-on): Add.
+
+2009-12-15  Tobias C. Rittweiler  <tcr at freebits.de>
+
 	* swank-asdf.lisp (map-defined-systems): Factored out.
 	(list-all-systems-known-to-asdf): Use it.
 	(asdf-determine-system): Use it, too.
--- /project/slime/cvsroot/slime/contrib/swank-asdf.lisp	2009/12/15 20:14:38	1.21
+++ /project/slime/cvsroot/slime/contrib/swank-asdf.lisp	2009/12/15 20:29:01	1.22
@@ -21,6 +21,22 @@
   (loop for (nil . system) being the hash-values in asdf::*defined-systems*
         do (funcall fn system)))
 
+;;; This is probably a crude hack, see ASDF's LP #481187.
+(defun who-depends-on (system)
+  (flet ((system-dependencies (op system)
+           (mapcar #'(lambda (dep)
+                       (asdf::coerce-name (if (consp dep) (second dep) dep)))
+                   (cdr (assoc op (asdf:component-depends-on op system))))))
+    (let ((system-name (asdf::coerce-name system))
+          (result))
+      (map-defined-systems
+       #'(lambda (system)
+           (when (member system-name
+                         (system-dependencies 'asdf:load-op system)
+                         :test #'string=)
+             (push (asdf:component-name system) result))))
+      result)))
+
 (defslimefun operate-on-system-for-emacs (system-name operation &rest keywords)
   "Compile and load SYSTEM using ASDF.
 Record compiler notes signalled as `compiler-condition's."





More information about the slime-cvs mailing list