Commit 5767144f authored by Pascal J. Bourguignon's avatar Pascal J. Bourguignon

Merged.

parents 341b973c 903419f4
......@@ -27,6 +27,11 @@ doc/version.texinfo
doc/*.log
*.tmp
uiop/doc/uiop.html
uiop/doc/uiop.info
uiop/doc/uiop.pdf
uiop/doc/uiop.texinfo
LICENSE
README.html
tmp/
......@@ -49,6 +54,7 @@ test/try-reloading-dependency.asd
test/fileMissing.lisp
test/hello-world-example
test/test-include.asd
test/test-multiple-too.asd
build-stamp
......@@ -65,7 +71,7 @@ debian/files
.pc
/.DS_Store
.DS_Store
core
......
......@@ -160,6 +160,7 @@ push:
doc: ;
website:
${MAKE} -C doc website
${MAKE} -C uiop/doc website
clean_dirs = $(sourceDirectory)
clean_extensions = fasl dfsl cfsl fasl fas lib dx32fsl lx64fsl lx32fsl ufasl o bak x86f vbin amd64f sparcf sparc64f hpf hp64f
......@@ -172,7 +173,7 @@ clean:
find $$dir \( -name "*.$$ext" \) \
-and -not -path \""*/.git/*"\" \
-and -not -path \""*/_darcs/*"\" \
-and -not -path \""*/tags/*"\" -print -delete; \
-and -not -path \""*/tags/*"\" -delete; \
done; \
fi; \
echo "Cleaned $$dir"; \
......@@ -181,6 +182,7 @@ clean:
rm -rf build/ LICENSE test/try-reloading-dependency.asd test/hello-world-example asdf.lisp
rm -rf test/hello-world-example.exe test/mkcl_*.dll # needed only on MS-Windows
${MAKE} -C doc clean
${MAKE} -C uiop/doc clean
mrproper:
git clean -xfd
......
......@@ -150,7 +150,7 @@ Debugging ASDF
To interactively debug ASDF, you may load it in such a way that `M-.` will work,
by installing the source code, and running:
(map () 'load (asdf:input-files :monolithic-concatenate-source-op "asdf"))
(map () 'load (asdf:input-files :monolithic-concatenate-source-op "asdf/defsystem"))
To interactively use the `asdf-tools`, you need to either have
all its dependencies installed and configured.
......@@ -295,4 +295,5 @@ How do I navigate this source tree?
* This file.
* [TODO](TODO)
* Plenty of ideas for how to further improve ASDF.
* Plenty of ideas for how to further improve ASDF
(not all of them guaranteed good ideas.)
......@@ -3,28 +3,37 @@
;;; ;;;
;;; Free Software available under an MIT-style license. ;;;
;;; ;;;
;;; Copyright (c) 2001-2016 Daniel Barlow and contributors ;;;
;;; Copyright (c) 2001-2018 Daniel Barlow and contributors ;;;
;;; ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package :asdf)
;; We can't rely on it being defined in uiop.asd, since that file isn't loaded.
(defun call-without-redefinition-warnings (thunk)
(handler-bind (((or
#+allegro simple-warning
#+clozure ccl:compiler-warning
#+cmucl kernel:simple-style-warning
#-(or allegro clozure cmucl) warning)
#'muffle-warning))
(funcall thunk)))
;; Note that it's polite to sort the defsystem forms in dependency order,
;; and compulsory to sort them in defsystem-depends-on order.
#+asdf3
(defsystem "asdf/prelude"
;; Note that it's polite to sort the defsystem forms in dependency order,
;; and compulsory to sort them in defsystem-depends-on order.
:version (:read-file-form "version.lisp-expr")
:around-compile call-without-redefinition-warnings ;; we need be the same as uiop
:encoding :utf-8
:components
((:file "header")))
:components ((:file "header")))
#+asdf3
(defsystem "asdf/driver"
;; This is the same as "uiop", but used for transclusion in asdf.lisp.
;; Because asdf.asd can't afford to depend on reading uiop.asd
;; (which would cause circularity, since everything depends on reading asdf.asd),
;; we can't "just" :depends-on ("uiop") like we used to do.
;; Since ASDF 3.3, asdf.asd can't afford to depend on reading uiop.asd,
;; which would cause circularity, since everything depends on reading asdf.asd.
;; Therefore, we can't "just" :depends-on ("uiop") like we used to do, and instead
;; we transclude the list of uiop component into this secondary system.
:pathname "uiop"
:around-compile call-without-redefinition-warnings ;; we need be the same as uiop
:components #.(getf (read-file-form (subpathname *load-pathname* "uiop/uiop.asd") :at 2) :components))
......@@ -84,13 +93,14 @@
:licence "MIT"
:description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "3.3.1.2" ;; to be automatically updated by make bump-version
:version "3.3.2.11" ;; to be automatically updated by make bump-version
:depends-on ()
#+asdf3 :encoding #+asdf3 :utf-8
:class #+asdf3.1 package-inferred-system #-asdf3.1 system
;; 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 uiop (aka asdf-driver) and asdf/defsystem.
#+asdf3 :builtin-system-p #+asdf3 t
:components ((:module "build" :components ((:file "asdf"))))
:in-order-to (#+asdf3 (prepare-op (monolithic-concatenate-source-op "asdf/defsystem"))))
. #-asdf3 () #+asdf3
(:encoding :utf-8
:class #+asdf3.1 package-inferred-system #-asdf3.1 system
;; 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 uiop (aka asdf/driver) and asdf/defsystem.
:builtin-system-p t
:in-order-to ((prepare-op (monolithic-concatenate-source-op "asdf/defsystem")))))
......@@ -523,8 +523,17 @@ which is probably not what you want; you probably need to tweak your output tran
:static-library (resolve-symlinks* pathname))))
(defun linkable-system (x)
(or (if-let (s (find-system x))
(or ;; If the system is available as source, use it.
(if-let (s (find-system x))
(and (output-files 'lib-op s) s))
;; If an ASDF upgrade is available from source, but not a UIOP upgrade to that,
;; then use the asdf/driver system instead of
;; the UIOP that was disabled by check-not-old-asdf-system.
(if-let (s (and (equal (coerce-name x) "uiop")
(output-files 'lib-op "asdf")
(find-system "asdf/driver")))
(and (output-files 'lib-op s) s))
;; If there was no source upgrade, look for modules provided by the implementation.
(if-let (p (system-module-pathname (coerce-name x)))
(make-prebuilt-system x p))))
......
......@@ -77,9 +77,9 @@ or NIL for top-level components (a.k.a. systems)"))
(defmethod component-parent ((component null)) nil)
;; Deprecated: Backward compatible way of computing the FILE-TYPE of a component.
;; TODO: find users, have them stop using that, remove it for ASDF4.
(defgeneric source-file-type (component system)
(:documentation "DEPRECATED. Use the FILE-TYPE of a COMPONENT instead."))
(with-asdf-deprecation (:style-warning "3.4")
(defgeneric source-file-type (component system)
(:documentation "DEPRECATED. Use the FILE-TYPE of a COMPONENT instead.")))
(define-condition duplicate-names (system-definition-error)
((name :initarg :name :reader duplicate-names-name))
......
(in-package :asdf)
(defclass fiveam-tester-system (system)
((test-names
:initarg :test-names
:reader test-names
:documentation "A list whose elments are either
cons cells of symbol and package designators or
simply a symbol designator.
In the latter case, the symbols will be interned
in the package designated by the TEST-PACKAGE slot,
which must be bound.")
(test-package
:initarg :default-test-package
:initarg :test-package
:documentation "If all the tests are in one package, you can just
have a list of test names in test-names, and get the package name from
here.")
(num-checks
:initarg :num-checks
:reader num-checks
:type (or null (integer 0))
:initform nil
:documentation "How many tests do you expect to run when
you invoke the test-op on this system. For backwards compatibility,
this slot is ignored if it's NIL. If bound, then when running the
test-op, we will fail if the expected number of checks are not run.")
))
(define-condition fiveam-asdf-failure (error)
((failed-asdf-component
:initarg :failed-asdf-component
:reader failed-asdf-component
))
(:documentation "Superclass of error conditions that indicate that
an ASDF test-op has failed."))
(define-condition fiveam-test-fail (fiveam-asdf-failure)
((failed
:initarg :failed
:reader failed
))
(:report (lambda (x s)
(format s "Tests on system ~a failed: ~{~t~a~%~}"
(component-name (failed-asdf-component x))
(failed x)))))
(define-condition fiveam-wrong-number-of-checks (fiveam-asdf-failure)
((expected-num-checks
:initarg :expected
:initarg :expected-num-checks
:reader expected-num-checks
)
(actual-num-checks
:initarg :actual-num-checks
:initarg :actual
:reader actual-num-checks
))
(:report (lambda (x s)
(format s "Unexpected number of tests on system ~a: Expected ~d got ~d."
(component-name (failed-asdf-component x))
(expected-num-checks x)
(actual-num-checks x)))))
(defgeneric test-package (x)
(:method ((x fiveam-tester-system))
(if (slot-boundp x 'test-package)
(slot-value x 'test-package)
(error "If package is not specified with each test-name, system's TEST-PACKAGE slot must be set."))))
(defmethod perform ((op test-op) (sys fiveam-tester-system))
(let* ((test-syms
(loop for x in (test-names sys)
with test-name and package-name and test-sym and package
if (symbolp x)
do (setf test-name x
package-name (test-package sys))
else
do (assert (and (consp x)
(or (symbolp (car x)) (stringp (car x)))
(or (symbolp (cdr x)) (stringp (cdr x)))))
(setf test-name (car x) package-name (cdr x))
do (setf package (or (find-package package-name)
(error "Unable to find package ~a" package-name)))
(setf test-sym
(intern
(etypecase test-name
(string test-name)
(symbol (symbol-name test-name)))
package))
collect test-sym))
(runner (intern (symbol-name '#:run) :fiveam))
(tester (intern (symbol-name '#:results-status) :fiveam))
(explainer (intern (symbol-name '#:explain!) :fiveam))
(results (loop for test in test-syms
appending (funcall runner test))))
(funcall explainer results)
;; if there's an expected number of checks, verify that we have run
;; exactly that number.
(when (num-checks sys)
(let ((actual-num-checks (length results)))
(unless (= actual-num-checks (num-checks sys))
(error 'fiveam-wrong-number-of-checks
:failed-asdf-component sys
:actual actual-num-checks
:expected (num-checks sys)))))
(multiple-value-bind (success failures)
(funcall tester results)
(unless success
(error 'fiveam-test-fail :failed-asdf-component sys :failed failures)))))
(defmethod component-depends-on ((op load-op) (sys fiveam-tester-system))
(cons '(load-op "fiveam") (call-next-method)))
(defmethod component-depends-on ((op compile-op) (sys fiveam-tester-system))
(cons '(load-op "fiveam") (call-next-method)))
(eval-when (:compile-toplevel :load-toplevel :execute)
(export 'fiveam-tester-system :asdf))
;;;---------------------------------------------------------------------------
;;; Copyright (c) 2012-2018 Smart Information Flow Technologies, d/b/a SIFT, LLC and
;;; Robert P. Goldman
;;; All rights reserved.
;;;
;;; The developers make this software available according to the terms
;;; of the Lisp Lesser GNU Public License (LLGPL):
;;; http://opensource.franz.com/preamble.html.
;;; See the accompanying file, license.txt
;;;
;;;---------------------------------------------------------------------------
;;;
;;; This system provides functionality to support integrating FiveAM tests with
;;; an ASDF system definition in such a way that invocation of the
;;; ASDF:TEST-SYSTEM function will cause the FiveAM tests to run. An error will
;;; be raised if there are test failures.
;;;
;;;---------------------------------------------------------------------------
(defpackage :fiveam-asdf-asd
(:use :common-lisp :asdf)
)
(in-package :fiveam-asdf-asd)
(defsystem fiveam-asdf
:long-description
"System that defines a new system class FIVEAM-TESTER
that provides functionality for running tests using
FIVEAM and raising an error if the tests fail
\(useful for incorporation in a Jenkins or Hudson
build\)."
:depends-on (:asdf)
:components ((:file "code"))
:author "Robert P. Goldman"
:version "2.0"
:license "Lisp LGPL"
)
FIVEAM-ASDF is a library enabling suites of FiveAM tests to be
associated with ASDF systems in such a way that ASDF:TEST-SYSTEM will
cause the tests to be run and will raise an exception if something
unexpected happens.
FIVEAM-ASDF is licensed under the terms of the Lisp Lesser GNU
Public License (http://opensource.franz.com/preamble.html), known as
the LLGPL. The LLGPL consists of a preamble (see above URL) and the
LGPL. Where these conflict, the preamble takes precedence.
FIVEAM-ASDF is referenced in the preamble as the "LIBRARY."
cl-asdf (2:3.3.2-1) unstable; urgency=low
Bug fix release:
* Dependency tracking: fix bugs in handling misnamed secondary systems.
We now distinguish between "syntactic" and "semantic" primariness,
properly warn in case a secondary system is misnamed, yet properly
recompile or avoid spurious recompilation depending on whether
there or not is a conflict or redefinition.
Similarly handle package-inferred-system (thanks to Eric Timmons).
Better warning in a fishy case of compute-action-stamp.
* UIOP: Add package location information to define-package on SBCL.
* Upgrade: fix issue with asdf/bundle.
* Portability: add support for Mezzano (thanks to E. Housel, H. Harrington)
* Documentation: add discussion of best practices.
* Package-inferred system: Improve source file handling.
* Test and documentation improvements.
-- Francois-Rene Rideau <fare@tunes.org> Thu, 03 May 2018 22:46:19 -0400
cl-asdf (2:3.3.1-1) unstable; urgency=low
New milestone:
......@@ -12,7 +31,7 @@ cl-asdf (2:3.3.1-1) unstable; urgency=low
* Tests: tests for new capabilities and bugs
* Documentation: a number of improvements and clarifications.
-- Robert P. Goldman <rpgoldman@sift.net> Sun, 12 Nov 2017 17:39:04 -0600
-- Robert P. Goldman <rpgoldman@sift.net> Sun, 12 Nov 2017 17:39:04 -0600
cl-asdf (2:3.3.0-1) unstable; urgency=low
......@@ -49,7 +68,7 @@ cl-asdf (2:3.3.0-1) unstable; urgency=low
* Deprecation: starting to emit STYLE-WARNINGs for deprecated
functions. Will gradually escalate to true WARNINGs and then ERRORs.
-- Robert P. Goldman <rpgoldman@sift.net> Sun, 20 August 2017 21:00:00 -0500
-- Robert P. Goldman <rpgoldman@sift.net> Sun, 20 August 2017 21:00:00 -0500
cl-asdf (2:3.2.1-1) unstable; urgency=low
......
This diff is collapsed.
......@@ -322,6 +322,7 @@
<a href="http://clisp.org/">CLISP</a>,
<a href="http://cmucl.org/">CMUCL</a>,
<a href="https://common-lisp.net/project/ecl/" title="Embeddable Common Lisp">ECL</a>,
<a href="https://github.com/froggey/Mezzano/" title="Mezzano">Mezzano</a>,
<a href="https://common-lisp.net/project/mkcl/" title="ManKai Common Lisp">MKCL</a>,
<a href="http://www.sbcl.org/" title="Steel Bank Common Lisp">SBCL</a>
</td>
......@@ -393,10 +394,18 @@ Corman Common Lisp <admin@cormanlisp.com>
<h3>Documentation</h3>
<p>You can read our manual:</p>
<ul>
<li><a href="asdf.html">as one HTML file</a></li>
<li><a href="asdf/">split into one HTML file per section</a></li>
<li><a href="asdf.pdf">as a PDF document</a></li>
<li><a href="https://gitlab.common-lisp.net/asdf/asdf/blob/master/doc/asdf.texinfo">as texinfo source</a></li>
<li>ASDF</li>
<ul>
<li><a href="asdf.html">as one HTML file</a></li>
<li><a href="asdf/">split into one HTML file per section</a></li>
<li><a href="asdf.pdf">as a PDF document</a></li>
<li><a href="https://gitlab.common-lisp.net/asdf/asdf/blob/master/doc/asdf.texinfo">as texinfo source</a></li>
</ul>
<li>UIOP</li>
<ul>
<li><a href="uiop.html">as one HTML file</a></li>
<li><a href="uiop.pdf">as a PDF document</a></li>
</ul>
</ul>
<p>
The first few sections,
......
Today we release ASDF 3.3.2, the second bugfix release for the 3.3 release series. Of primary interest in this release are
1. Multiple fixes in handling misnamed (or "legacy-named," if you prefer) secondary systems ("foo-test" instead of "foo/test"). Thanks to Eric Timmons, there is also a similar fix for package-inferred-systems.
2. Fix an annoying warning message for compute-action-stamp.
3. Add support for the Mezzano implementation (thanks to E. Housel, H. Harrington).
4. Miscellaneous minor fixes and documentation tweaks.
We urge implementations that are currently bundling previous versions of ASDF -- and especially those bundling 3.3.0 or 3.3.1 -- to upgrade to 3.3.2 at their earliest convenience.
Immense thanks, as always, to Fare Rideau. Also thanks to the many bug reporters and patch submitters (see the Changelog), and to Anton Vodonosov and Dave Cooper for help with testing.
Here is the changelog entry for 3.3.2:
cl-asdf (2:3.3.2-1) unstable; urgency=low
Bug fix release:
* Dependency tracking: fix bugs in handling misnamed secondary systems.
We now distinguish between "syntactic" and "semantic" primariness,
properly warn in case a secondary system is misnamed, yet properly
recompile or avoid spurious recompilation depending on whether
there or not is a conflict or redefinition.
Similarly handle package-inferred-system (thanks to Eric Timmons).
Better warning in a fishy case of compute-action-stamp.
* UIOP: Add package location information to define-package on SBCL.
* Upgrade: fix issue with asdf/bundle.
* Portability: add support for Mezzano (thanks to E. Housel, H. Harrington)
* Documentation: add discussion of best practices.
* Package-inferred system: Improve source file handling.
* Test and documentation improvements.
-- Francois-Rene Rideau <fare@tunes.org> Thu, 03 May 2018 22:46:19 -0400
......@@ -82,11 +82,9 @@
;; TODO: could this file be refactored so that locate-system is merely
;; the cache-priming call to input-files here?
(defmethod input-files ((o define-op) (s system))
(assert (equal (coerce-name s) (primary-system-name s)))
(if-let ((asd (system-source-file s))) (list asd)))
(defmethod perform ((o define-op) (s system))
(assert (equal (coerce-name s) (primary-system-name s)))
(nest
(if-let ((pathname (first (input-files o s)))))
(let ((readtable *readtable*) ;; save outer syntax tables. TODO: proper syntax-control
......@@ -143,8 +141,9 @@ Do NOT try to load a .asd file directly with CL:LOAD. Always use ASDF:LOAD-ASD."
(defvar *old-asdf-systems* (make-hash-table :test 'equal))
;; (Private) function to check that a system that was found isn't an asdf downgrade.
;; Returns T if everything went right, NIL if the system was an ASDF of the same or older version,
;; that shall not be loaded. Also issue a warning if it was a strictly older version of ASDF.
;; Returns T if everything went right, NIL if the system was an ASDF at an older version,
;; or UIOP of the same or older version, that shall not be loaded.
;; Also issue a warning if it was a strictly older version of ASDF.
(defun check-not-old-asdf-system (name pathname)
(or (not (member name '("asdf" "uiop") :test 'equal))
(null pathname)
......@@ -155,9 +154,12 @@ Do NOT try to load a .asd file directly with CL:LOAD. Always use ASDF:LOAD-ASD."
(read-file-form version-pathname :at (if asdfp '(0) '(2 2 2)))))
(old-version (asdf-version)))
(cond
;; Don't load UIOP of the exact same version: we already loaded it as part of ASDF.
((and (equal old-version version) (equal name "uiop")) nil)
((version<= old-version version) t) ;; newer or same version: Good!
;; Same version is OK for ASDF, to allow loading from modified source.
;; However, do *not* load UIOP of the exact same version:
;; it was already loaded it as part of ASDF and would only be double-loading.
;; Be quiet about it, though, since it's a normal situation.
((equal old-version version) asdfp)
((version< old-version version) t) ;; newer version: Good!
(t ;; old version: bad
(ensure-gethash
(list (namestring pathname) version) *old-asdf-systems*
......@@ -195,21 +197,25 @@ Do NOT try to load a .asd file directly with CL:LOAD. Always use ASDF:LOAD-ASD."
(defun locate-system (name)
"Given a system NAME designator, try to locate where to load the system from.
Returns five values: FOUNDP FOUND-SYSTEM PATHNAME PREVIOUS PREVIOUS-TIME
Returns six values: FOUNDP FOUND-SYSTEM PATHNAME PREVIOUS PREVIOUS-TIME PREVIOUS-PRIMARY
FOUNDP is true when a system was found,
either a new unregistered one or a previously registered one.
FOUND-SYSTEM when not null is a SYSTEM object that may be REGISTER-SYSTEM'ed.
PATHNAME when not null is a path from which to load the system,
either associated with FOUND-SYSTEM, or with the PREVIOUS system.
PREVIOUS when not null is a previously loaded SYSTEM object of same name.
PREVIOUS-TIME when not null is the time at which the PREVIOUS system was loaded."
PREVIOUS-TIME when not null is the time at which the PREVIOUS system was loaded.
PREVIOUS-PRIMARY when not null is the primary system for the PREVIOUS system."
(with-asdf-session () ;; NB: We don't cache the results. We once used to, but it wasn't useful,
;; and keeping a negative cache was a bug (see lp#1335323), which required
;; explicit invalidation in clear-system and find-system (when unsucccessful).
(let* ((name (coerce-name name))
(previous (registered-system name)) ; load from disk if absent or newer on disk
(primary (registered-system (primary-system-name name)))
(previous-time (and previous primary (component-operation-time 'define-op primary)))
(previous-primary-name (and previous (primary-system-name previous)))
(previous-primary-system (and previous-primary-name
(registered-system previous-primary-name)))
(previous-time (and previous-primary-system
(component-operation-time 'define-op previous-primary-system)))
(found (search-for-system-definition name))
(found-system (and (typep found 'system) found))
(pathname (ensure-pathname
......@@ -222,37 +228,38 @@ PREVIOUS-TIME when not null is the time at which the PREVIOUS system was loaded.
(unless (check-not-old-asdf-system name pathname)
(check-type previous system) ;; asdf is preloaded, so there should be a previous one.
(setf found-system nil pathname nil))
(values foundp found-system pathname previous previous-time))))
(values foundp found-system pathname previous previous-time previous-primary-system))))
;; TODO: make a prepare-define-op node for this
;; so we can properly cache the answer rather than recompute it.
(defun definition-dependencies-up-to-date-p (system)
(check-type system system)
(or (not (primary-system-p system))
(handler-case
(loop :with plan = (make-instance *plan-class*)
:for action :in (definition-dependency-list system)
:always (action-up-to-date-p
plan (action-operation action) (action-component action))
:finally
(let ((o (make-operation 'define-op)))
(multiple-value-bind (stamp done-p)
(compute-action-stamp plan o system)
(return (and (timestamp<= stamp (component-operation-time o system))
done-p)))))
(system-out-of-date () nil))))
;; Main method for find-system: first, make sure the computation is memoized in a session cache.
;; Unless the system is immutable, use locate-system to find the primary system;
;; reconcile the finding (if any) with any previous definition (in a previous session,
;; preloaded, with a previous configuration, or before filesystem changes), and
;; load a found .asd if appropriate. Finally, update registration table and return results.
(defun definition-dependencies-up-to-date-p (system)
(check-type system system)
(assert (primary-system-p system))
(handler-case
(loop :with plan = (make-instance *plan-class*)
:for action :in (definition-dependency-list system)
:always (action-up-to-date-p
plan (action-operation action) (action-component action))
:finally
(let ((o (make-operation 'define-op)))
(multiple-value-bind (stamp done-p)
(compute-action-stamp plan o system)
(return (and (timestamp<= stamp (component-operation-time o system))
done-p)))))
(system-out-of-date () nil)))
(defmethod find-system ((name string) &optional (error-p t))
(nest
(with-asdf-session (:key `(find-system ,name)))
(let ((name-primary-p (primary-system-p name)))
(unless name-primary-p (find-system (primary-system-name name) nil)))
(or (and *immutable-systems* (gethash name *immutable-systems*) (registered-system name)))
(multiple-value-bind (foundp found-system pathname previous previous-time)
(multiple-value-bind (foundp found-system pathname previous previous-time previous-primary)
(locate-system name)
(assert (eq foundp (and (or found-system pathname previous) t))))
(let ((previous-pathname (system-source-file previous))
......@@ -263,18 +270,18 @@ PREVIOUS-TIME when not null is the time at which the PREVIOUS system was loaded.
(setf (system-source-file system) pathname))
(if-let ((stamp (get-file-stamp pathname)))
(let ((up-to-date-p
(and previous
(and previous previous-primary
(or (pathname-equal pathname previous-pathname)
(and pathname previous-pathname
(pathname-equal
(physicalize-pathname pathname)
(physicalize-pathname previous-pathname))))
(timestamp<= stamp previous-time)
;; TODO: check that all dependencies are up-to-date.
;; This necessitates traversing them without triggering
;; the adding of nodes to the plan.
(or (not name-primary-p)
(definition-dependencies-up-to-date-p previous)))))
;; Check that all previous definition-dependencies are up-to-date,
;; traversing them without triggering the adding of nodes to the plan.
;; TODO: actually have a prepare-define-op, extract its timestamp,
;; and check that it is less than the stamp of the previous define-op ?
(definition-dependencies-up-to-date-p previous-primary))))
(unless up-to-date-p
(restart-case
(signal 'system-out-of-date :name name)
......
......@@ -7,10 +7,10 @@
:asdf/system ;; used by ECL
:asdf/upgrade :asdf/system-registry :asdf/operate :asdf/bundle)
;; Happily, all those implementations all have the same module-provider hook interface.
#+(or abcl clasp cmucl clozure ecl mkcl sbcl)
(:import-from #+abcl :sys #+(or clasp cmucl ecl) :ext #+clozure :ccl #+mkcl :mk-ext #+sbcl sb-ext
#:*module-provider-functions*
#+ecl #:*load-hooks*)
#+(or abcl clasp cmucl clozure ecl mezzano mkcl sbcl)
(:import-from #+abcl :sys #+(or clasp cmucl ecl) :ext #+clozure :ccl #+mkcl :mk-ext #+sbcl sb-ext #+mezzano :sys.int
#:*module-provider-functions*
#+ecl #:*load-hooks*)
#+(or clasp mkcl) (:import-from :si #:*load-hooks*))
(in-package :asdf/footer)
......@@ -24,7 +24,7 @@
;;;; Hook ASDF into the implementation's REQUIRE and other entry points.
#+(or abcl clasp clisp clozure cmucl ecl mkcl sbcl)
#+(or abcl clasp clisp clozure cmucl ecl mezzano mkcl sbcl)
(with-upgradability ()
;; Hook into CL:REQUIRE.
#-clisp (pushnew 'module-provide-asdf *module-provider-functions*)
......@@ -44,15 +44,15 @@
(setf (gethash 'module-provide-asdf *wrapped-module-provider*) 'module-provide-asdf)
(defun wrap-module-provider (provider name)
(let ((results (multiple-value-list (funcall provider name))))
(when (first results) (register-preloaded-system (coerce-name name)))
(values-list results)))
(when (first results) (register-preloaded-system (coerce-name name)))
(values-list results)))
(defun wrap-module-provider-function (provider)
(ensure-gethash provider *wrapped-module-provider*
(constantly
#'(lambda (module-name)
(wrap-module-provider provider module-name)))))
(constantly
#'(lambda (module-name)
(wrap-module-provider provider module-name)))))
(setf *module-provider-functions*
(mapcar #'wrap-module-provider-function *module-provider-functions*))))
(mapcar #'wrap-module-provider-function *module-provider-functions*))))
#+cmucl ;; Hook into the CMUCL herald.
(with-upgradability ()
......
;;; -*- mode: Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; buffer-read-only: t; -*-
;;; This is ASDF 3.3.1.2: Another System Definition Facility.
;;; This is ASDF 3.3.2.11: Another System Definition Facility.
;;;
;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>.
......@@ -45,3 +45,14 @@
;;; The problem with writing a defsystem replacement is bootstrapping:
;;; we can't use defsystem to compile it. Hence, all in one file.
#+genera
(eval-when (:compile-toplevel :load-toplevel :execute)
(multiple-value-bind (system-major system-minor)
(sct:get-system-version)
(multiple-value-bind (is-major is-minor)
(sct:get-system-version "Intel-Support")
(unless (or (> system-major 452)
(and is-major
(or (> is-major 3)
(and (= is-major 3) (> is-minor 86)))))
(error "ASDF requires either System 453 or later or Intel Support 3.87 or later")))))
......@@ -77,6 +77,7 @@
#:system-maintainer
#:system-license
#:system-licence
#:system-version
#:system-source-file
#:system-source-directory
#:system-relative-pathname
......
......@@ -138,7 +138,7 @@ otherwise return a default system name computed from PACKAGE-NAME."
previous
(eval `(defsystem ,system
:class package-inferred-system
:source-file nil
:source-file ,(system-source-file top)
:pathname ,dir
:depends-on ,dependencies
:around-compile ,around-compile
......
......@@ -169,7 +169,7 @@ Please only define ~S and secondary systems with a name starting with ~S (e.g. ~
;;; "inline methods"
(with-upgradability ()
(defparameter* +asdf-methods+
'(perform-with-restarts perform explain output-files operation-done-p))
'(perform-with-restarts perform explain output-files operation-done-p))
(defun %remove-component-inline-methods (component)
(dolist (name +asdf-methods+)
......@@ -182,19 +182,55 @@ Please only define ~S and secondary systems with a name starting with ~S (e.g. ~
(component-inline-methods component)))
(component-inline-methods component) nil)
(defparameter *standard-method-combination-qualifiers*
'(:around :before :after))
;;; Find inline method definitions of the form
;;;
;;; :perform (test-op :before (operation component) ...)
;;;
;;; in REST (which is the plist of all DEFSYSTEM initargs) and define the specified methods.
(defun %define-component-inline-methods (ret rest)
;; find key-value pairs that look like inline method definitions in REST. For each identified
;; definition, parse it and, if it is well-formed, define the method.
(loop* :for (key value) :on rest :by #'cddr
:for name = (and (keywordp key) (find key +asdf-methods+ :test 'string=))
:when name :do
(destructuring-bind (op &rest body) value
(loop :for arg = (pop body)
:while (atom arg)
:collect arg :into qualifiers
:finally
(destructuring-bind (o c) arg
(pushnew