From 8132c95c396479ce1da28ac9fc160dd194c3b00a Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tunes@google.com> Date: Wed, 19 Dec 2012 16:08:15 -0500 Subject: [PATCH] 2.26.36: Restore compatibility with assumption that system inherits from module. This assumption is notably made by tens of systems that use the old ASDF1 method of specifying the pathname type for components: (defmethod source-file-type ((c foo-file) (s module)) "foo") Sigh. My bad for recommending people use module and not system, here. --- asdf.asd | 2 +- asdf.lisp | 12 ++++++++---- doc/asdf.texinfo | 6 +++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/asdf.asd b/asdf.asd index edf7ae80..a622c5f8 100644 --- a/asdf.asd +++ b/asdf.asd @@ -14,7 +14,7 @@ :licence "MIT" :description "Another System Definition Facility" :long-description "ASDF builds Common Lisp software organized into defined systems." - :version "2.26.35" ;; to be automatically updated by bin/bump-revision + :version "2.26.36" ;; to be automatically updated by bin/bump-revision :depends-on () :components ((:file "asdf"))) diff --git a/asdf.lisp b/asdf.lisp index e1e83b0a..c41b9015 100644 --- a/asdf.lisp +++ b/asdf.lisp @@ -1,5 +1,5 @@ ;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; coding: utf-8 -*- -;;; This is ASDF 2.26.35: Another System Definition Facility. +;;; This is ASDF 2.26.36: Another System Definition Facility. ;;; ;;; Feedback, bug reports, and patches are all welcome: ;;; please mail to <asdf-devel@common-lisp.net>. @@ -118,7 +118,7 @@ ;; "2.345.6" would be a development version in the official upstream ;; "2.345.0.7" would be your seventh local modification of official release 2.345 ;; "2.345.6.7" would be your seventh local modification of development version 2.345.6 - (asdf-version "2.26.35") + (asdf-version "2.26.36") (existing-asdf (find-class 'component nil)) (existing-version *asdf-version*) (already-there (equal asdf-version existing-version))) @@ -1518,7 +1518,9 @@ and implementation-defined external-format's") ;; but also to modify parse-component-form to reset the recycled objects. ((name) (source-file) #|(children) (children-by-names)|#)) -(defclass system (parent-component proto-system) +;; ASDF3: we ought to inherit from parent-component, not module. +;; But if it's not backwards, it's not compatible. +(defclass system (module proto-system) (;; description and long-description are now available for all component's, ;; but now also inherited from component, but we add the legacy accessor (description :accessor system-description :initarg :description) @@ -2173,9 +2175,11 @@ PREVIOUS-TIME when not null is the time at which the PREVIOUS system was loaded. ;; Upward operations, like prepare-op, propagate up the component hierarchy: ;; operation on a child depends-on operation on its parent. +;; For backward-compatibility reasons, a system inherits from module and is a child-component +;; so we must guard against this case. ASDF3: remove that. (defclass upward-operation (operation) ()) (defmethod component-depends-on ((o upward-operation) (c child-component)) - `((,o ,(component-parent c)) ,@(call-next-method))) + (append (aif (component-parent c) `((,o ,it))) (call-next-method))) ;; Our default operations: loading into the current lisp image (defclass basic-load-op () ()) diff --git a/doc/asdf.texinfo b/doc/asdf.texinfo index ee7cf85e..6460eceb 100644 --- a/doc/asdf.texinfo +++ b/doc/asdf.texinfo @@ -4126,7 +4126,7 @@ you can define a class as follows: (in-package :my-asdf-extension) (defclass cl-source-file.lis (cl-source-file) - ((type :initform "lis"))) + ((type :initform "lis"))) @end lisp Then you can use it as follows: @@ -4160,8 +4160,8 @@ In short, though: do same as above, but you also define the following method: @lisp -(defmethod source-file-type ((f cl-source-file.lis) (m module)) - (declare (ignorable f m)) +(defmethod source-file-type ((f cl-source-file.lis) (s system)) + (declare (ignorable f s)) "lis") @end lisp -- GitLab