Commit c3cb58db authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

2.32.35: also catch non-system-system definitions. Add test cases.

parent c19a17d8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@
  :licence "MIT"
  :description "Another System Definition Facility"
  :long-description "ASDF builds Common Lisp software organized into defined systems."
  :version "2.32.34" ;; to be automatically updated by make bump-version
  :version "2.32.35" ;; to be automatically updated by make bump-version
  :depends-on ()
  #+asdf3 :encoding #+asdf3 :utf-8
  ;; For most purposes, asdf itself specially counts as a builtin system.
+11 −1
Original line number Diff line number Diff line
@@ -11,7 +11,8 @@
   #:defsystem #:register-system-definition
   #:class-for-type #:*default-component-class*
   #:determine-system-directory #:parse-component-form
   #:duplicate-names #:non-toplevel-system #:sysdef-error-component #:check-component-input))
   #:duplicate-names #:non-toplevel-system #:non-system-system
   #:sysdef-error-component #:check-component-input))
(in-package :asdf/defsystem)

;;; Pathname
@@ -71,6 +72,13 @@
               (format s (compatfmt "~@<Error while defining system: multiple components are given same name ~S~@:>")
                       (duplicate-names-name c)))))

  (define-condition non-system-system (system-definition-error)
    ((name :initarg :name :reader non-system-system-name)
     (class-name :initarg :class-name :reader non-system-system-class-name))
    (:report (lambda (c s)
               (format s (compatfmt "~@<Error while defining system ~S: class ~S isn't a subclass of ~S~@:>")
                       (non-system-system-name c) (non-system-system-class-name c) 'system))))

  (define-condition non-toplevel-system (system-definition-error)
    ((parent :initarg :parent :reader non-toplevel-system-parent)
     (name :initarg :name :reader non-toplevel-system-name))
@@ -222,6 +230,8 @@
        ;; We change-class AFTER we loaded the defsystem-depends-on
        ;; since the class might be defined as part of those.
        (let ((class (class-for-type nil class)))
          (unless (subtypep class 'system)
            (error 'non-system-system :name name :class-name (class-name class)))
          (unless (eq (type-of system) class)
            (change-class system class)))
        (parse-component-form
+8 −3
Original line number Diff line number Diff line
@@ -993,7 +993,7 @@ component-list := ( @var{component-def}* )

component-def  := ( component-type simple-component-name @var{option}* )

component-type := :system | :module | :file | :static-file | other-component-type
component-type := :module | :file | :static-file | other-component-type

other-component-type := symbol-by-name (@pxref{The defsystem grammar,,Component types})

@@ -1035,10 +1035,15 @@ the current package. So a component type @code{my-component-type}, in
the current package @code{my-system-asd} can be specified as
@code{:my-component-type}, or @code{my-component-type}.

@code{system} and its subclasses are @emph{not}
allowed as component types for such children components.

@subsection System class names

A system class name will be looked up in the same way as a Component
type (see above).  Typically, one will not need to specify a system
A system class name will be looked up
in the same way as a Component type (see above),
except that only @code{system} and its subclasses are allowed.
Typically, one will not need to specify a system
class name, unless using a non-standard system class defined in some
ASDF extension, typically loaded through @code{DEFSYSTEM-DEPENDS-ON},
see below.  For such class names in the ASDF package, we recommend that
+1 −1
Original line number Diff line number Diff line
;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
;;; This is ASDF 2.32.34: Another System Definition Facility.
;;; This is ASDF 2.32.35: Another System Definition Facility.
;;;
;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>.
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@
   #:missing-dependency
   #:missing-dependency-of-version
   #:circular-dependency        ; errors
   #:duplicate-names #:non-toplevel-system
   #:duplicate-names #:non-toplevel-system #:non-system-system

   #:try-recompiling
   #:retry
Loading