aboutsummaryrefslogtreecommitdiff
path: root/src/data.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-02-24 10:06:30 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-02-24 10:06:30 -0700
commitabcde492596564dbc69ee0fc7f5cb0380937c9b2 (patch)
tree926877c8339859000d9c1f0fce4d699c5a762776 /src/data.lisp
parentac17e28f7d927cad8884b33e66c47abaab8f85e3 (diff)
downloadconsfigurator-abcde492596564dbc69ee0fc7f5cb0380937c9b2.tar.gz
remote Lisp images can ignore failures to load consfigs as systems
We ensure the packages comprising those systems will be loaded. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/data.lisp')
-rw-r--r--src/data.lisp23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/data.lisp b/src/data.lisp
index 98b8386..5ec2c2a 100644
--- a/src/data.lisp
+++ b/src/data.lisp
@@ -354,13 +354,26 @@ host which will run the Lisp image must already be established.
Called by connections which start up remote Lisp images."
(flet ((wrap (forms)
- `(handler-bind ((missing-data-source
- (lambda (c)
- (declare (ignore c))
- (invoke-restart 'skip-data-source))))
+ `(handler-bind
+ (;; we can skip missing data sources because these are not
+ ;; expected to be available outside of the root Lisp
+ (missing-data-source
+ (lambda (c)
+ (declare (ignore c))
+ (invoke-restart 'skip-data-source)))
+ ;; we can skip missing components when our particular restart
+ ;; is available because we've already uploaded everything
+ ;; that was declared to be required
+ (asdf/find-component:missing-component
+ (lambda (c)
+ (declare (ignore c))
+ (let ((restart (find-restart 'continue-without-system)))
+ (when restart (invoke-restart restart))))))
,@forms)))
(let ((intern-forms
- (loop for name in '("MISSING-DATA-SOURCE" "SKIP-DATA-SOURCE")
+ (loop for name in '("MISSING-DATA-SOURCE"
+ "SKIP-DATA-SOURCE"
+ "CONTINUE-WITHOUT-SYSTEM")
collect
`(export (intern ,name (find-package "CONSFIGURATOR"))
(find-package "CONSFIGURATOR"))))