From f849a739af36c5439f0da301c7caa98eae32ac73 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Wed, 23 Sep 2020 12:21:56 -0400 Subject: [PATCH] Raise an error if library compilation fails If a program tries to build a dependent library and the compilation fails, we need to know about it --- cyclone.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cyclone.scm b/cyclone.scm index 642edb18..a2030c48 100644 --- a/cyclone.scm +++ b/cyclone.scm @@ -279,8 +279,10 @@ (for-each (lambda (lib-dep) (when (recompile? lib-dep append-dirs prepend-dirs) - (system (string-append "cyclone " - (lib:import->filename lib-dep ".sld" append-dirs prepend-dirs))))) + (let ((result (system (string-append "cyclone " + (lib:import->filename lib-dep ".sld" append-dirs prepend-dirs))))) + (when (> result 0) + (error "Unable to compile library" lib-dep))))) lib-deps)) ;; Validate syntax of basic forms