From e9253b36fb98b0cd34dd2be9693240648bb031c8 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 17 Mar 2021 23:43:43 -0700 Subject: improve the DEFUN defined for calling properties programmatically - Move the connection type check to %CONSFIGURE, so that we're not doing the check over and over again for propapps combined by property combinators. - Splice the check back in when writing the DEFUN. - Issue a warning when a property with a :HOSTATTRS subroutine is used programmatically. - DEFUN now has property's lambda list, rather than just (&REST ARGS). Signed-off-by: Sean Whitton --- src/deployment.lisp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/deployment.lisp') diff --git a/src/deployment.lisp b/src/deployment.lisp index 5dbafbb..d4a7500 100644 --- a/src/deployment.lisp +++ b/src/deployment.lisp @@ -25,7 +25,11 @@ Assumes HOST has already had its :HOSTATTRS subroutines run, and arguments to connections in CONNECTIONS have been both normalised and preprocessed." (labels - ((connect (connections) + ((apply-propspec (propspec) + (let ((propapp (eval-propspec propspec))) + (assert-connection-supports (propapptype propapp)) + (propappapply propapp))) + (connect (connections) (destructuring-bind ((type . args) . remaining) connections ;; implementations of ESTABLISH-CONNECTION which call ;; CONTINUE-DEPLOY* or CONTINUE-DEPLOY*-PROGRAM return nil to us @@ -33,7 +37,7 @@ connections in CONNECTIONS have been both normalised and preprocessed." (apply #'establish-connection type remaining args))) (if remaining (connect remaining) - (propappapply (eval-propspec (host-propspec *host*)))) + (apply-propspec (host-propspec *host*))) (connection-teardown *connection*))))) (let ((*host* (preprocess-host host))) (connect (if (eq :local (caar connections)) -- cgit v1.2.3