Commit 1e4bafdb authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

2.28.1: various upgrade issues

1- To make life easier on Xach, stop requiring asdf.lisp to be loaded as source
before it's compiled. Instead, wrap each and every single form in an eval-when,
most of the time via the with-upgradability macro that also transforms
defun into defun* and defgeneric into defgeneric*.
Causes massive reindentation :-(

2- Have a proper :version for fallback systems.
Will make systems that check the version happier.

3- protect a condition with #+sb-eval. Fixes lp#1116408.

4- Protect warnings-file methods with dynamic when *warnings-file-type*
rather than static #+.
parent 03a7774a
* implement deferred warnings support on abcl, allegro, clisp, cmucl, lispworks, scl)
* fix upgrade on clisp
** Extract minimal test case
* Bug found by fe[nl]ix: infinite loop if the definitions in an asd file
......
This diff is collapsed.
......@@ -29,9 +29,9 @@
:description "The defsystem part of ASDF"
:long-name "Another System Definition Facility"
:description "The portable defsystem for Common Lisp"
:long-description "ASDF/DEFSYSTEM is the standard DEFSYSTEM facility for Common Lisp,
:long-description "ASDF/DEFSYSTEM is the de facto standard DEFSYSTEM facility for Common Lisp,
a successor to Dan Barlow's ASDF and Francois-Rene Rideau's ASDF2.
For bootstrap purposes, it comes bundled with ASDF/DRIVER in a single file asdf.lisp."
For bootstrap purposes, it comes bundled with ASDF/DRIVER in a single file, asdf.lisp."
:homepage "http://common-lisp.net/projects/asdf/"
:bug-tracker "https://launchpad.net/asdf/"
:mailto "asdf-devel@common-lisp.net"
......@@ -74,25 +74,13 @@
:licence "MIT"
:description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "2.28" ;; to be automatically updated by make bump-version
:version "2.28.1" ;; 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.
;; If you want to link it or do something forbidden to builtin systems,
;; specify separate dependencies on asdf-driver and asdf-defsystem.
#+asdf3 :builtin-system-p #+asdf3 t
:components
((:module "build"
:components
(#-gcl2.6
(:file "asdf"
#+asdf3 :in-order-to #+asdf3 ((compile-op (load-source-op "asdf")))))))
:in-order-to (#+asdf3 (prepare-source-op (monolithic-concatenate-source-op :asdf/defsystem))))
:components ((:module "build" :components ((:file "asdf"))))
:in-order-to (#+asdf3 (prepare-op (monolithic-concatenate-source-op :asdf/defsystem))))
;; Using :do-first instead of :in-order-to works above from ASDF 2.017 to 2.26,
;; but only this (or an equivalent defmethod component-do-first) works for ASDF1
#-asdf3
(setf (slot-value
(find-component (find-component (find-system "asdf") "build") "asdf")
'asdf::do-first)
'((compile-op (load-source-op "asdf"))))
......@@ -15,25 +15,26 @@
;;;; Backward compatibility with various pathname functions.
(defun* coerce-pathname (name &key type defaults)
;; For backward-compatibility only, for people using internals
;; Reported users in quicklisp: hu.dwim.asdf, asdf-utils, xcvb
;; Will be removed after 2014-01-16.
;;(warn "Please don't use ASDF::COERCE-PATHNAME. Use ASDF/PATHNAME:PARSE-UNIX-NAMESTRING.")
(parse-unix-namestring name :type type :defaults defaults))
(with-upgradability ()
(defun coerce-pathname (name &key type defaults)
;; For backward-compatibility only, for people using internals
;; Reported users in quicklisp: hu.dwim.asdf, asdf-utils, xcvb
;; Will be removed after 2014-01-16.
;;(warn "Please don't use ASDF::COERCE-PATHNAME. Use ASDF/PATHNAME:PARSE-UNIX-NAMESTRING.")
(parse-unix-namestring name :type type :defaults defaults))
(defun* component-name-to-pathname-components (unix-style-namestring
&key force-directory force-relative)
;; Will be removed after 2014-01-16.
;; (warn "Please don't use ASDF::COMPONENT-NAME-TO-PATHNAME-COMPONENTS, use SPLIT-UNIX-NAMESTRING-DIRECTORY-COMPONENTS")
(multiple-value-bind (relabs path filename file-only)
(split-unix-namestring-directory-components
unix-style-namestring :ensure-directory force-directory)
(declare (ignore file-only))
(when (and force-relative (not (eq relabs :relative)))
(error (compatfmt "~@<Absolute pathname designator not allowed: ~3i~_~S~@:>")
unix-style-namestring))
(values relabs path filename)))
(defun component-name-to-pathname-components (unix-style-namestring
&key force-directory force-relative)
;; Will be removed after 2014-01-16.
;; (warn "Please don't use ASDF::COMPONENT-NAME-TO-PATHNAME-COMPONENTS, use SPLIT-UNIX-NAMESTRING-DIRECTORY-COMPONENTS")
(multiple-value-bind (relabs path filename file-only)
(split-unix-namestring-directory-components
unix-style-namestring :ensure-directory force-directory)
(declare (ignore file-only))
(when (and force-relative (not (eq relabs :relative)))
(error (compatfmt "~@<Absolute pathname designator not allowed: ~3i~_~S~@:>")
unix-style-namestring))
(values relabs path filename)))
#+(or ecl mkcl)
(defun* compile-file-keeping-object (&rest args) (apply #'compile-file* args))
#+(or ecl mkcl)
(defun compile-file-keeping-object (&rest args) (apply #'compile-file* args)))
This diff is collapsed.
......@@ -15,74 +15,76 @@
(in-package :asdf/backward-internals)
;;;; Backward compatibility with "inline methods"
(with-upgradability ()
(defparameter +asdf-methods+
'(perform-with-restarts perform explain output-files operation-done-p))
(defparameter +asdf-methods+
'(perform-with-restarts perform explain output-files operation-done-p))
(defun %remove-component-inline-methods (component)
(dolist (name +asdf-methods+)
(map ()
;; this is inefficient as most of the stored
;; methods will not be for this particular gf
;; But this is hardly performance-critical
#'(lambda (m)
(remove-method (symbol-function name) m))
(component-inline-methods component)))
;; clear methods, then add the new ones
(component-inline-methods component) nil)
(defun* %remove-component-inline-methods (component)
(dolist (name +asdf-methods+)
(map ()
;; this is inefficient as most of the stored
;; methods will not be for this particular gf
;; But this is hardly performance-critical
#'(lambda (m)
(remove-method (symbol-function name) m))
(component-inline-methods component)))
;; clear methods, then add the new ones
(component-inline-methods component) nil)
(defun %define-component-inline-methods (ret rest)
(dolist (name +asdf-methods+)
(let ((keyword (intern (symbol-name name) :keyword)))
(loop :for data = rest :then (cddr data)
:for key = (first data)
:for value = (second data)
:while data
:when (eq key keyword) :do
(destructuring-bind (op qual (o c) &body body) value
(pushnew
(eval `(defmethod ,name ,qual ((,o ,op) (,c (eql ,ret)))
,@body))
(component-inline-methods ret)))))))
(defun* %define-component-inline-methods (ret rest)
(dolist (name +asdf-methods+)
(let ((keyword (intern (symbol-name name) :keyword)))
(loop :for data = rest :then (cddr data)
:for key = (first data)
:for value = (second data)
:while data
:when (eq key keyword) :do
(destructuring-bind (op qual (o c) &body body) value
(pushnew
(eval `(defmethod ,name ,qual ((,o ,op) (,c (eql ,ret)))
,@body))
(component-inline-methods ret)))))))
(defun* %refresh-component-inline-methods (component rest)
(%remove-component-inline-methods component)
(%define-component-inline-methods component rest))
(defun %refresh-component-inline-methods (component rest)
(%remove-component-inline-methods component)
(%define-component-inline-methods component rest)))
;;;; PARTIAL SUPPORT for the :if-component-dep-fails component attribute
;; and the companion asdf:feature pseudo-dependency.
;; This won't recurse into dependencies to accumulate feature conditions.
;; Therefore it will accept the SB-ROTATE-BYTE of an old SBCL
;; (older than 1.1.2.20-fe6da9f) but won't suffice to load an old nibbles.
(defun* %resolve-if-component-dep-fails (if-component-dep-fails component)
(asdf-message "The system definition for ~S uses deprecated ~
(with-upgradability ()
(defun %resolve-if-component-dep-fails (if-component-dep-fails component)
(asdf-message "The system definition for ~S uses deprecated ~
ASDF option :IF-COMPONENT-DEP-DAILS. ~
Starting with ASDF 3, please use :IF-FEATURE instead"
(coerce-name (component-system component)))
;; This only supports the pattern of use of the "feature" seen in the wild
(check-type component parent-component)
(check-type if-component-dep-fails (member :fail :ignore :try-next))
(unless (eq if-component-dep-fails :fail)
(loop :with o = (make-operation 'compile-op)
:for c :in (component-children component) :do
(loop* :for (feature? feature) :in (component-depends-on o c)
:when (eq feature? 'feature) :do
(setf (component-if-feature c) feature)))))
(coerce-name (component-system component)))
;; This only supports the pattern of use of the "feature" seen in the wild
(check-type component parent-component)
(check-type if-component-dep-fails (member :fail :ignore :try-next))
(unless (eq if-component-dep-fails :fail)
(loop :with o = (make-operation 'compile-op)
:for c :in (component-children component) :do
(loop* :for (feature? feature) :in (component-depends-on o c)
:when (eq feature? 'feature) :do
(setf (component-if-feature c) feature))))))
(when-upgrading (:when (fboundp 'make-sub-operation))
(defun* make-sub-operation (c o dep-c dep-o)
(defun make-sub-operation (c o dep-c dep-o)
(declare (ignore c o dep-c dep-o)) (asdf-upgrade-error)))
;;;; load-sysdef
(defun* load-sysdef (name pathname)
(load-asd pathname :name name))
(with-upgradability ()
(defun load-sysdef (name pathname)
(load-asd pathname :name name))
(defun* make-temporary-package ()
;; For loading a .asd file, we dont't make a temporary package anymore,
;; but use ASDF-USER. I'd like to have this function do this,
;; but since whoever uses it is likely to delete-package the result afterwards,
;; this would be a bad idea, so preserve the old behavior.
(make-package (fresh-package-name :prefix :asdf :index 0) :use '(:cl :asdf)))
(defun make-temporary-package ()
;; For loading a .asd file, we dont't make a temporary package anymore,
;; but use ASDF-USER. I'd like to have this function do this,
;; but since whoever uses it is likely to delete-package the result afterwards,
;; this would be a bad idea, so preserve the old behavior.
(make-package (fresh-package-name :prefix :asdf :index 0) :use '(:cl :asdf))))
This diff is collapsed.
......@@ -13,39 +13,42 @@
;; * fewer accesses to the filesystem
;; * the ability to test with fake timestamps, without touching files
(defvar *asdf-cache* nil)
(defun set-asdf-cache-entry (key value-list)
(apply 'values
(if *asdf-cache*
(setf (gethash key *asdf-cache*) value-list)
value-list)))
(defun consult-asdf-cache (key thunk)
(if *asdf-cache*
(multiple-value-bind (results foundp) (gethash key *asdf-cache*)
(if foundp
(apply 'values results)
(set-asdf-cache-entry key (multiple-value-list (funcall thunk)))))
(funcall thunk)))
(defmacro do-asdf-cache (key &body body)
`(consult-asdf-cache ,key #'(lambda () ,@body)))
(defun call-with-asdf-cache (thunk &key override)
(if (and *asdf-cache* (not override))
(funcall thunk)
(let ((*asdf-cache* (make-hash-table :test 'equal)))
(funcall thunk))))
(defmacro with-asdf-cache ((&key override) &body body)
`(call-with-asdf-cache #'(lambda () ,@body) :override ,override))
(defun compute-file-stamp (file)
(safe-file-write-date file))
(defun register-file-stamp (file &optional (stamp (compute-file-stamp file)))
(set-asdf-cache-entry `(get-file-stamp ,file) (list stamp)))
(defun get-file-stamp (file)
(do-asdf-cache `(get-file-stamp ,file) (compute-file-stamp file)))
(with-upgradability ()
(defvar *asdf-cache* nil)
(defun set-asdf-cache-entry (key value-list)
(apply 'values
(if *asdf-cache*
(setf (gethash key *asdf-cache*) value-list)
value-list)))
(defun consult-asdf-cache (key thunk)
(if *asdf-cache*
(multiple-value-bind (results foundp) (gethash key *asdf-cache*)
(if foundp
(apply 'values results)
(set-asdf-cache-entry key (multiple-value-list (funcall thunk)))))
(funcall thunk)))
(defmacro do-asdf-cache (key &body body)
`(consult-asdf-cache ,key #'(lambda () ,@body)))
(defun call-with-asdf-cache (thunk &key override)
(if (and *asdf-cache* (not override))
(funcall thunk)
(let ((*asdf-cache* (make-hash-table :test 'equal)))
(funcall thunk))))
(defmacro with-asdf-cache ((&key override) &body body)
`(call-with-asdf-cache #'(lambda () ,@body) :override ,override))
(defun compute-file-stamp (file)
(safe-file-write-date file))
(defun register-file-stamp (file &optional (stamp (compute-file-stamp file)))
(set-asdf-cache-entry `(get-file-stamp ,file) (list stamp)))
(defun get-file-stamp (file)
(do-asdf-cache `(get-file-stamp ,file) (compute-file-stamp file))))
......@@ -47,7 +47,7 @@
(setf *print-readably* nil))
#+cormanlisp
(progn
(eval-when (:load-toplevel :compile-toplevel :execute)
(deftype logical-pathname () nil)
(defun make-broadcast-stream () *error-output*)
(defun translate-logical-pathname (x) x)
......@@ -81,8 +81,8 @@
(export 'type-of :asdf/common-lisp)
(export 'system:*load-pathname* :asdf/common-lisp))
#+gcl2.6
(progn ;; Doesn't support either logical-pathnames or output-translations.
#+gcl2.6 ;; Doesn't support either logical-pathnames or output-translations.
(eval-when (:load-toplevel :compile-toplevel :execute)
(defvar *gcl2.6* t)
(deftype logical-pathname () nil)
(defun type-of (x) (class-name (class-of x)))
......@@ -108,13 +108,14 @@
(namestring (make-pathname :name nil :type nil :version nil :defaults path))))))
#+genera
(unless (fboundp 'ensure-directories-exist)
(defun ensure-directories-exist (path)
(fs:create-directories-recursively (pathname path))))
(eval-when (:load-toplevel :compile-toplevel :execute)
(unless (fboundp 'ensure-directories-exist)
(defun ensure-directories-exist (path)
(fs:create-directories-recursively (pathname path)))))
#.(or #+mcl ;; the #$ doesn't work on other lisps, even protected by #+mcl
#.(or #+mcl ;; the #$ doesn't work on other lisps, even protected by #+mcl, so we use this trick
(read-from-string
"(eval-when (:compile-toplevel :load-toplevel :execute)
"(eval-when (:load-toplevel :compile-toplevel :execute)
(ccl:define-entry-point (_getenv \"getenv\") ((name :string)) :string)
(ccl:define-entry-point (_system \"system\") ((name :string)) :int)
;; Note: ASDF may expect user-homedir-pathname to provide
......@@ -138,9 +139,10 @@
;;;; Looping
(defmacro loop* (&rest rest)
#-genera `(loop ,@rest)
#+genera `(lisp:loop ,@rest)) ;; In genera, CL:LOOP can't destructure, so we use LOOP*. Sigh.
(eval-when (:load-toplevel :compile-toplevel :execute)
(defmacro loop* (&rest rest)
#-genera `(loop ,@rest)
#+genera `(lisp:loop ,@rest))) ;; In genera, CL:LOOP can't destructure, so we use LOOP*. Sigh.
;;;; compatfmt: avoid fancy format directives when unsupported
......
This diff is collapsed.
......@@ -23,83 +23,84 @@
;;;
;;; Concatenate sources
;;;
(defclass concatenate-source-op (bundle-op)
((bundle-type :initform "lisp")))
(defclass load-concatenated-source-op (basic-load-op operation)
((bundle-type :initform :no-output-file)))
(defclass compile-concatenated-source-op (basic-compile-op bundle-op)
((bundle-type :initform :fasl)))
(defclass load-compiled-concatenated-source-op (basic-load-op operation)
((bundle-type :initform :no-output-file)))
(with-upgradability ()
(defclass concatenate-source-op (bundle-op)
((bundle-type :initform "lisp")))
(defclass load-concatenated-source-op (basic-load-op operation)
((bundle-type :initform :no-output-file)))
(defclass compile-concatenated-source-op (basic-compile-op bundle-op)
((bundle-type :initform :fasl)))
(defclass load-compiled-concatenated-source-op (basic-load-op operation)
((bundle-type :initform :no-output-file)))
(defclass monolithic-concatenate-source-op (concatenate-source-op monolithic-op) ())
(defclass monolithic-load-concatenated-source-op (load-concatenated-source-op monolithic-op) ())
(defclass monolithic-compile-concatenated-source-op (compile-concatenated-source-op monolithic-op) ())
(defclass monolithic-load-compiled-concatenated-source-op (load-compiled-concatenated-source-op monolithic-op) ())
(defclass monolithic-concatenate-source-op (concatenate-source-op monolithic-op) ())
(defclass monolithic-load-concatenated-source-op (load-concatenated-source-op monolithic-op) ())
(defclass monolithic-compile-concatenated-source-op (compile-concatenated-source-op monolithic-op) ())
(defclass monolithic-load-compiled-concatenated-source-op (load-compiled-concatenated-source-op monolithic-op) ())
(defmethod input-files ((operation concatenate-source-op) (s system))
(loop :with encoding = (or (component-encoding s) *default-encoding*)
:with other-encodings = '()
:with around-compile = (around-compile-hook s)
:with other-around-compile = '()
:for c :in (required-components
s :goal-operation 'compile-op
:keep-operation 'compile-op
:other-systems (operation-monolithic-p operation))
:append
(when (typep c 'cl-source-file)
(let ((e (component-encoding c)))
(unless (equal e encoding)
(pushnew e other-encodings :test 'equal)))
(let ((a (around-compile-hook c)))
(unless (equal a around-compile)
(pushnew a other-around-compile :test 'equal)))
(input-files (make-operation 'compile-op) c)) :into inputs
:finally
(when other-encodings
(warn "~S uses encoding ~A but has sources that use these encodings: ~A"
operation encoding other-encodings))
(when other-around-compile
(warn "~S uses around-compile hook ~A but has sources that use these hooks: ~A"
operation around-compile other-around-compile))
(return inputs)))
(defmethod input-files ((operation concatenate-source-op) (s system))
(loop :with encoding = (or (component-encoding s) *default-encoding*)
:with other-encodings = '()
:with around-compile = (around-compile-hook s)
:with other-around-compile = '()
:for c :in (required-components
s :goal-operation 'compile-op
:keep-operation 'compile-op
:other-systems (operation-monolithic-p operation))
:append
(when (typep c 'cl-source-file)
(let ((e (component-encoding c)))
(unless (equal e encoding)
(pushnew e other-encodings :test 'equal)))
(let ((a (around-compile-hook c)))
(unless (equal a around-compile)
(pushnew a other-around-compile :test 'equal)))
(input-files (make-operation 'compile-op) c)) :into inputs
:finally
(when other-encodings
(warn "~S uses encoding ~A but has sources that use these encodings: ~A"
operation encoding other-encodings))
(when other-around-compile
(warn "~S uses around-compile hook ~A but has sources that use these hooks: ~A"
operation around-compile other-around-compile))
(return inputs)))
(defmethod input-files ((o load-concatenated-source-op) (s system))
(direct-dependency-files o s))
(defmethod input-files ((o compile-concatenated-source-op) (s system))
(direct-dependency-files o s))
(defmethod output-files ((o compile-concatenated-source-op) (s system))
(let ((input (first (input-files o s))))
(list (compile-file-pathname input))))
(defmethod input-files ((o load-compiled-concatenated-source-op) (s system))
(direct-dependency-files o s))
(defmethod input-files ((o load-concatenated-source-op) (s system))
(direct-dependency-files o s))
(defmethod input-files ((o compile-concatenated-source-op) (s system))
(direct-dependency-files o s))
(defmethod output-files ((o compile-concatenated-source-op) (s system))
(let ((input (first (input-files o s))))
(list (compile-file-pathname input))))
(defmethod input-files ((o load-compiled-concatenated-source-op) (s system))
(direct-dependency-files o s))
(defmethod perform ((o concatenate-source-op) (s system))
(let ((inputs (input-files o s))
(output (output-file o s)))
(concatenate-files inputs output)))
(defmethod perform ((o load-concatenated-source-op) (s system))
(perform-lisp-load-source o s))
(defmethod perform ((o compile-concatenated-source-op) (s system))
(perform-lisp-compilation o s))
(defmethod perform ((o load-compiled-concatenated-source-op) (s system))
(perform-lisp-load-fasl o s))
(defmethod perform ((o concatenate-source-op) (s system))
(let ((inputs (input-files o s))
(output (output-file o s)))
(concatenate-files inputs output)))
(defmethod perform ((o load-concatenated-source-op) (s system))
(perform-lisp-load-source o s))
(defmethod perform ((o compile-concatenated-source-op) (s system))
(perform-lisp-compilation o s))
(defmethod perform ((o load-compiled-concatenated-source-op) (s system))
(perform-lisp-load-fasl o s))
(defmethod component-depends-on ((o concatenate-source-op) (s system))
(declare (ignorable o s)) nil)
(defmethod component-depends-on ((o load-concatenated-source-op) (s system))
(declare (ignorable o s)) `((prepare-op ,s) (concatenate-source-op ,s)))
(defmethod component-depends-on ((o compile-concatenated-source-op) (s system))
(declare (ignorable o s)) `((concatenate-source-op ,s)))
(defmethod component-depends-on ((o load-compiled-concatenated-source-op) (s system))
(declare (ignorable o s)) `((compile-concatenated-source-op ,s)))
(defmethod component-depends-on ((o concatenate-source-op) (s system))
(declare (ignorable o s)) nil)
(defmethod component-depends-on ((o load-concatenated-source-op) (s system))
(declare (ignorable o s)) `((prepare-op ,s) (concatenate-source-op ,s)))
(defmethod component-depends-on ((o compile-concatenated-source-op) (s system))
(declare (ignorable o s)) `((concatenate-source-op ,s)))
(defmethod component-depends-on ((o load-compiled-concatenated-source-op) (s system))
(declare (ignorable o s)) `((compile-concatenated-source-op ,s)))
(defmethod component-depends-on ((o monolithic-concatenate-source-op) (s system))
(declare (ignorable o s)) nil)
(defmethod component-depends-on ((o monolithic-load-concatenated-source-op) (s system))
(declare (ignorable o s)) `((monolithic-concatenate-source-op ,s)))
(defmethod component-depends-on ((o monolithic-compile-concatenated-source-op) (s system))
(declare (ignorable o s)) `((monolithic-concatenate-source-op ,s)))
(defmethod component-depends-on ((o monolithic-load-compiled-concatenated-source-op) (s system))
(declare (ignorable o s)) `((monolithic-compile-concatenated-source-op ,s)))
(defmethod component-depends-on ((o monolithic-concatenate-source-op) (s system))
(declare (ignorable o s)) nil)
(defmethod component-depends-on ((o monolithic-load-concatenated-source-op) (s system))
(declare (ignorable o s)) `((monolithic-concatenate-source-op ,s)))
(defmethod component-depends-on ((o monolithic-compile-concatenated-source-op) (s system))
(declare (ignorable o s)) `((monolithic-concatenate-source-op ,s)))
(defmethod component-depends-on ((o monolithic-load-compiled-concatenated-source-op) (s system))
(declare (ignorable o s)) `((monolithic-compile-concatenated-source-op ,s))))
This diff is collapsed.
This diff is collapsed.
......@@ -32,20 +32,19 @@
<div class="contents">
<a id="ASDF 3"></a>
<h3>ASDF 3</h3>
<p>ASDF 3, released on January 31st 2013,
<p>ASDF 3, pre-released as 2.28 on February 1st 2013,
is the current successor to Daniel Barlow's ASDF.
It was improved for portability, robustness, usability,
It was rewritten for improved portability, robustness, usability,
extensibility, configurability, internal consistency,
the ability to create standalone executables.
and the ability to create standalone executables.
</p>
<a id="what_it_is"></a>
<h3>What it is</h3>
<p>ASDF 3 contains two parts: ASDF/DEFSYSTEM and ASDF/DRIVER.
</p>
<p>ASDF/DEFSYSTEM,
is a tool to describe how source code are organized,
and how to build the system with
what action depends on what previous actions.
is a tool to describe how Lisp source code is organized in systems,
and how to build a system in term of actions that depend on previous actions.
</p>
<p>It is roughly what Common Lisp hackers use to build software
where C hackers might use GNU Make.
......@@ -85,25 +84,26 @@
Drew McDermott's
<a href="http://cs-www.cs.yale.edu/homes/dvm/">YTools</a>
(trying to maintain coherence of the current Lisp image at a fine grain),
or the newcomer
the newcomer
<a href="http://lisp.ystok.ru/asdlite/">ASDlite</a>
(a somewhat improved incompatible variant of ASDF 1).
(a somewhat improved incompatible variant of ASDF 1, less featureful than ASDF 3),
or Alastair Bridgewater's interesting quick-build (unreleased, similar to faslpath below).
Older systems that are not maintained anymore include
Mark Kantrowitz's <a href="http://www.cliki.net/mk-defsystem">mk-defsystem</a>
(free software successor of the old proprietary DEFSYSTEM's and predecessor of ASDF),
(free software successor of the old proprietary DEFSYSTEM's and predecessor of ASDF, obsolete),
Sean Ross's <a href="http://sean-ross.blogspot.com/search/label/mudballs">mudballs</a>
(aborted attempt at making things cleaner than in ASDF),
(an attempt at making things cleaner than in ASDF, aborted),
Peter Etter's <a href="http://www.cliki.net/faslpath">faslpath</a>
(a much simpler system establishing a mapping between packages and files),
(a much simpler system establishing a mapping between packages and files)
Alexander Kahl's <a href="http://www.cliki.net/evol">evol</a>
(a reimplementation of the GNU autotools stack in Lisp),
(a reimplementation of the GNU autotools stack in Lisp, abandoned),
and probably more.
However, none of these systems seems to ever have had the traction of ASDF.
</p>
<a id="implementations"></a>
<h3>Supported Implementations</h3>
<p>ASDF 3 now supports all CL implementations
that seem to have any current user base.
that seem to have any current user base, and then some.
</p><p>
Most implementations provide ASDF 2 as a module,
and you can simply <tt>(require "asdf")</tt>.
......@@ -258,11 +258,13 @@ Peter Graves <gnooth@gmail.com>
and have also been superseded by ASDF-OUTPUT-TRANSLATIONS.
</li>
<li>ASDF-BUNDLE, née ASDF-ECL,
allowed you to create single-file bundled outputs for your systems,
allowed you to create a single-file bundle out of a system,
for easier delivery.
It is now a builtin part of ASDF/DEFSYSTEM.
It is now a builtin part of ASDF/DEFSYSTEM,
and allows to deliver a single FASL for a system,
or (on supported implementations), a standalone executable program.
</li>
<li>ASDF-UTILS was a colletion of utilities that originated with ASDF.
<li>ASDF-UTILS was a collection of utilities that originated with ASDF.
It is now superseded by ASDF/DRIVER, which is part of ASDF,
and exports its functionality in its own package ASDF/DRIVER.
</li>
......@@ -308,7 +310,7 @@ Peter Graves <gnooth@gmail.com>
<a id="news"></a>
<h3>What is happening</h3>
<dl>
<dt>In January 2013</dt>
<dt>In February 2013</dt>
<dd>
ASDF 3 now includes both the traditional ASDF/DEFSYSTEM
and a formalized portability library ASDF/DRIVER.
......@@ -367,9 +369,9 @@ Peter Graves <gnooth@gmail.com>
<a class="nav" href="http://www.catb.org/hacker-emblem/" title="hacker"> <img src="http://common-lisp.net/project/cl-containers/shared/buttons/hacker.png" width="80" height="15" title="hacker emblem" alt="hacker button" /></a>
<a class="nav" href="http://www.lisp.org/" title="Association of Lisp Users"> <img src="http://common-lisp.net/project/cl-containers/shared/buttons/lambda-lisp.png" width="80" height="15" title="ALU emblem" alt="ALU button" /></a>
<a class="nav" href="http://common-lisp.net/" title="Common-Lisp.net"> <img src="http://common-lisp.net/project/cl-containers/shared/buttons/lisp-lizard.png" width="80" height="15" title="Common-Lisp.net" alt="Common-Lisp.net button" /></a>
<p><span class="copyright"Copyright &copy; 2001-2012 Daniel Barlow and contributors</span></p>
<p><span class="copyright"Copyright &copy; 2001-2013 Daniel Barlow and contributors</span></p>
<p>ASDF has an <a href="http://www.opensource.org/licenses/mit-license.php">MIT style</a> license</p>
<div id="timestamp">Last updated 2012-07-28</div>
<div id="timestamp">Last updated 2013-02-05</div>
</div>
</body>
</html>
This diff is collapsed.
......@@ -18,111 +18,113 @@
;;;; Missing component conditions
(define-condition missing-component-of-version (missing-component)
((version :initform nil :reader missing-version :initarg :version)))
(with-upgradability ()
(define-condition missing-component-of-version (missing-component)
((version :initform nil :reader missing-version :initarg :version)))
(define-condition missing-dependency (missing-component)
((required-by :initarg :required-by :reader missing-required-by)))
(define-condition missing-dependency (missing-component)
((required-by :initarg :required-by :reader missing-required-by)))
(defmethod print-object ((c missing-dependency) s)
(format s (compatfmt "~@<~A, required by ~A~@:>")
(call-next-method c nil) (missing-required-by c)))
(defmethod print-object ((c missing-dependency) s)
(format s (compatfmt "~@<~A, required by ~A~@:>")
(call-next-method c nil) (missing-required-by c)))
(define-condition missing-dependency-of-version (missing-dependency
missing-component-of-version)
())
(define-condition missing-dependency-of-version (missing-dependency
missing-component-of-version)
())
(defmethod print-object ((c missing-component) s)
(format s (compatfmt "~@<Component ~S not found~@[ in ~A~]~@:>")
(missing-requires c)
(when (missing-parent c)
(coerce-name (missing-parent c)))))
(defmethod print-object ((c missing-component) s)
(format s (compatfmt "~@<Component ~S not found~@[ in ~A~]~@:>")
(missing-requires c)
(when (missing-parent c)
(coerce-name (missing-parent c)))))
(defmethod print-object ((c missing-component-of-version) s)
(format s (compatfmt "~@<Component ~S does not match version ~A~@[ in ~A~]~@:>")
(missing-requires c)
(missing-version c)
(when (missing-parent c)
(coerce-name (missing-parent c)))))
(defmethod print-object ((c missing-component-of-version) s)
(format s (compatfmt "~@<Component ~S does not match version ~A~@[ in ~A~]~@:>")
(missing-requires c)
(missing-version c)
(when (missing-parent c)
(coerce-name (missing-parent c))))))
;;;; Finding components
(defgeneric* (find-component) (base path)
(:documentation "Find a component by resolving the PATH starting from BASE parent"))
(defgeneric* resolve-dependency-combination (component combinator arguments))
(defmethod find-component ((base string) path)
(let ((s (find-system base nil)))
(and s (find-component s path))))
(defmethod find-component ((base symbol) path)
(cond
(base (find-component (coerce-name base) path))
(path (find-component path nil))
(t nil)))
(defmethod find-component ((base cons) path)
(find-component (car base) (cons (cdr base) path)))
(defmethod find-component ((parent parent-component) (name string))
(compute-children-by-name parent :only-if-needed-p t) ;; SBCL may miss the u-i-f-r-c method!!!
(values (gethash name (component-children-by-name parent))))
(defmethod find-component (base (name symbol))
(if name
(find-component base (coerce-name name))
base))
(defmethod find-component ((c component) (name cons))