move swank dependency to the cl-syntax-sugar infrastructure, therefore make it recompile-safe
Sun Mar 8 15:31:13 PDT 2009 attila.lendvai@gmail.com
* move swank dependency to the cl-syntax-sugar infrastructure, therefore make it recompile-safe
Warning: CRC errors found. These are probably harmless but should be repaired.
See 'darcs gzcrcs --help' for more information.
diff -rN -u old-computed-class/computed-class.asd new-computed-class/computed-class.asd
--- old-computed-class/computed-class.asd 2014-07-29 05:46:27.000000000 -0700
+++ new-computed-class/computed-class.asd 2014-07-29 05:46:27.000000000 -0700
@@ -23,8 +23,17 @@
(in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
- (asdf:operate 'asdf:load-op :closer-mop)
- (asdf:operate 'asdf:load-op :cl-syntax-sugar))
+ (flet ((try (system)
+ (unless (asdf:find-system system nil)
+ (warn "Trying to install required dependency: ~S" system)
+ (when (find-package :asdf-install)
+ (funcall (read-from-string "asdf-install:install") system))
+ (unless (asdf:find-system system nil)
+ (error "The ~A system requires ~A." (or *compile-file-pathname* *load-pathname*) system)))
+ (asdf:operate 'asdf:load-op system)))
+ (try :asdf-system-connections)
+ (try :closer-mop)
+ (try :cl-syntax-sugar)))
(defpackage :computed-class-system
(:use :common-lisp
@@ -83,8 +92,15 @@
(:file "mop" :depends-on ("engine" "configuration"))
(:file "api" :depends-on ("engine" "mop"))
(:file "clet" :depends-on ("engine"))
- (:file "defcfun" :depends-on ("engine"))
- (:file "swank-integration" :depends-on ("engine" "mop"))))
+ (:file "defcfun" :depends-on ("engine"))))
+
+(defsystem-connection computed-class-and-swank
+ :requires (:computed-class #:cl-syntax-sugar-and-swank)
+ :default-component-class cl-source-file-with-readtable
+ :class system-connection-with-readtable
+ :setup-readtable-function "computed-class::setup-readtable"
+ :components
+ ((:file "swank-integration")))
(defsystem :computed-class-test
:description "Tests for the computed-class system."
diff -rN -u old-computed-class/swank-integration.lisp new-computed-class/swank-integration.lisp
--- old-computed-class/swank-integration.lisp 2014-07-29 05:46:27.000000000 -0700
+++ new-computed-class/swank-integration.lisp 2014-07-29 05:46:27.000000000 -0700
@@ -22,18 +22,9 @@
(in-package :computed-class)
-#+#.(cl:when (cl:find-package "SWANK") '(:and))
-(eval-always
- (use-package :swank))
-
-#+#.(cl:when (cl:find-package "SWANK") '(:and))
-(progn
-
-(unless (assoc "COMPUTED-CLASS" *readtable-alist* :test #'string=)
- (let ((*readtable* (copy-readtable)))
- (setup-readtable)
- (push (cons "COMPUTED-CLASS" *readtable*) *readtable-alist*)
- (push (cons "COMPUTED-CLASS-TEST" *readtable*) *readtable-alist*)))
+(cl-syntax-sugar:register-readtable-for-swank
+ :computed-class 'setup-readtable
+ :computed-class-test 'setup-readtable)
;; when inspecting a computed slot, display the computed-state
(defmethod inspect-slot-for-emacs ((class computed-class)
@@ -56,5 +47,3 @@
(:action "[make unbound]" ,(lambda () (slot-makunbound-using-class class object slot)))))
(t (call-next-method)))))
-)
-