diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-05-17 15:45:48 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-05-17 17:03:06 -0700 |
commit | e62ef34e5d8eb0bae9e5d89fb12756d8af9f4663 (patch) | |
tree | f063e056db166e400a034e4f7529815e5973c6e6 /src/data.lisp | |
parent | 225e260419d2a5bb61bf4dc5861051810097232e (diff) | |
download | consfigurator-e62ef34e5d8eb0bae9e5d89fb12756d8af9f4663.tar.gz |
reflow
Pure code motion.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/data.lisp')
-rw-r--r-- | src/data.lisp | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/src/data.lisp b/src/data.lisp index b0936cf..eb1458f 100644 --- a/src/data.lisp +++ b/src/data.lisp @@ -623,32 +623,34 @@ Preprocessing must occur in the root Lisp.")) else collect intern-form)) (proclamations `((proclaim '(special *no-data-sources*)) (proclaim '(special *consfigurator-debug-level*)))) - (forms `((make-package "CONSFIGURATOR") - ,@intern-forms - ,@proclamations - ;; (define-condition missing-data-source (error) ()) - (require "asdf") - ;; Hide the compile and/or load output unless there are - ;; failures or the debug level is at least 3, as it's verbose - ;; and not usually of interest. - ,(wrap - `(let ((string - (make-array '(0) :element-type 'character - :fill-pointer 0 :adjustable t))) - (handler-case - (with-output-to-string (stream string) - (let ((*error-output* stream) - (*standard-output* stream)) - ,(asdf-requirements-load-form asdf-requirements))) - (serious-condition (c) - (format - *error-output* - "~&Failed to compile and/or load:~%~A~&~%Compile and/or load output:~%~%~A" - c string) - (uiop:quit 2))) - (when (>= *consfigurator-debug-level* 3) - (format t "~&~A" string)))) - ,(wrap `(%consfigure ',remaining-connections ,*host*))))) + (forms + `((make-package "CONSFIGURATOR") + ,@intern-forms + ,@proclamations + ;; (define-condition missing-data-source (error) ()) + (require "asdf") + ;; Hide the compile and/or load output unless there are + ;; failures or the debug level is at least 3, as it's verbose + ;; and not usually of interest. + ,(wrap + `(let ((string + (make-array '(0) :element-type 'character + :fill-pointer 0 :adjustable t))) + (handler-case + (with-output-to-string (stream string) + (let ((*error-output* stream) + (*standard-output* stream)) + ,(asdf-requirements-load-form + asdf-requirements))) + (serious-condition (c) + (format + *error-output* + "~&Failed to compile and/or load:~%~A~&~%Compile and/or load output:~%~%~A" + c string) + (uiop:quit 2))) + (when (>= *consfigurator-debug-level* 3) + (format t "~&~A" string)))) + ,(wrap `(%consfigure ',remaining-connections ,*host*))))) (handler-case (with-standard-io-syntax (let ((*allow-printing-passphrases* t)) |