From ecbd83d5097c9cf36cba21dc065e47a7b95b2385 Mon Sep 17 00:00:00 2001 From: "Robert P. Goldman" <rpgoldman@sift.net> Date: Fri, 17 Apr 2015 15:20:46 -0500 Subject: [PATCH] Fix for launchpad bug 1445638. When collecting the defsystem-dependencies in REGISTER-SYSTEM-DEFINITION, throw away NILs, which correspond to systems not needed because of :FEATURE checks. Added test case for bug, too. --- parse-defsystem.lisp | 5 +++-- test/test-defsystem-depends-on.script | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/parse-defsystem.lisp b/parse-defsystem.lisp index 49f2e12b..c500f509 100644 --- a/parse-defsystem.lisp +++ b/parse-defsystem.lisp @@ -250,8 +250,9 @@ system names contained using COERCE-NAME. Return the result." :name name :source-file source-file)) (component-options (remove-plist-keys '(:defsystem-depends-on :class) options)) - (defsystem-dependencies (loop :for spec :in defsystem-depends-on :collect - (resolve-dependency-spec nil spec)))) + (defsystem-dependencies (loop :for spec :in defsystem-depends-on + :when (resolve-dependency-spec nil spec) + :collect :it))) ;; cache defsystem-depends-on in canonical form (when defsystem-depends-on (setf component-options diff --git a/test/test-defsystem-depends-on.script b/test/test-defsystem-depends-on.script index e6eae133..733bb2db 100644 --- a/test/test-defsystem-depends-on.script +++ b/test/test-defsystem-depends-on.script @@ -1,5 +1,7 @@ ;;-*- Lisp -*- +(in-package :asdf-test) + (def-test-system test-defsystem-depends-on-1 :defsystem-depends-on (test-asdf/l-file) :default-component-class "l-file:cl-source-file.l" @@ -32,6 +34,7 @@ (defparameter *newsym* (gentemp (symbol-name 'feature) :keyword)) ;;; FIXME: the following form triggers bug https://bugs.launchpad.net/asdf/+bug/1445638 -#+nil (eval `(def-test-system test-defsystem-depends-on-4 :defsystem-depends-on ((:feature ,*newsym* "test-defsystem-depends-on-3")))) + +(assert (find-system "test-defsystem-depends-on-4")) -- GitLab