aboutsummaryrefslogtreecommitdiff
path: root/src/propspec.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-12-10 14:42:21 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-12-13 15:32:41 -0700
commit96363fc7741377ff40133c2656ebd93025a48a81 (patch)
treeb5b99c74208ccfb07020904d50c1dd1b1fffde44 /src/propspec.lisp
parentb819c80ed5ee2492924bf86beea06abd78dc0cbc (diff)
downloadconsfigurator-96363fc7741377ff40133c2656ebd93025a48a81.tar.gz
PROPSPEC class definition: refactor to avoid unneeded HANDLER-CASE
Suggested-by: Yehouda Harpaz <yeh@lispworks.com> Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/propspec.lisp')
-rw-r--r--src/propspec.lisp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/propspec.lisp b/src/propspec.lisp
index 57209fc..0bbf12a 100644
--- a/src/propspec.lisp
+++ b/src/propspec.lisp
@@ -134,14 +134,9 @@ package applies to hosts."))))
(define-condition no-consfig (simple-warning) ())
-(defclass propspec ()
- ((systems
- :initarg :systems
- :initform
- (or (handler-case (symbol-value (find-symbol "*CONSFIG*"))
- (unbound-variable ()))
- (warn 'no-consfig :format-arguments `(,*package*) :format-control
-"Initialising propspec without any list of ASDF systems supplied,
+(defun warn-no-consfig ()
+ (warn 'no-consfig :format-arguments `(,*package*) :format-control
+ "Initialising propspec without any list of ASDF systems supplied,
and *PACKAGE* is not a package for which IN-CONSFIG has been called.
Consfigurator may not be able to start up remote Lisp images to effect
deployments involving this propspec; see the docstring for IN-CONSFIG.
@@ -149,6 +144,13 @@ deployments involving this propspec; see the docstring for IN-CONSFIG.
Either call IN-CONSFIG for ~S, explicitly pass
:SYSTEMS NIL to MAKE-PROPSPEC, or muffle this warning if code using this
propspec will not need to start up any remote Lisp images."))
+
+(defclass propspec ()
+ ((systems
+ :initarg :systems
+ :initform
+ (or (aand (find-symbol "*CONSFIG*") (boundp it) (symbol-value it))
+ (warn-no-consfig))
:reader propspec-systems
:documentation
"List of names of ASDF systems, the loading of all of which is sufficient