From 1746c46baf904576a1b613c5172efa8be329d5da Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau Date: Mon, 28 Jan 2013 22:21:55 -0500 Subject: [PATCH] 2.26.163: export clear-defined-systems instead of make-defined-systems-table. Also, load .asd files in a with-standard-io-syntax. Export and tweak required-components. CMUCL now can hot upgrade from ASDF 2.018 and later. Simple documentation updates. --- README | 9 +++-- asdf.asd | 8 +++-- doc/index.html | 2 +- find-system.lisp | 30 ++++++++-------- header.lisp | 4 +-- interface.lisp | 1 + plan.lisp | 7 ++-- test/run-tests.sh | 8 ++--- test/test-retry-loading-component-1.script | 41 ++++++++-------------- upgrade.lisp | 2 +- utility.lisp | 4 +-- version.lisp-expr | 2 +- 12 files changed, 60 insertions(+), 58 deletions(-) diff --git a/README b/README index eb604a42..1be5d30a 100644 --- a/README +++ b/README @@ -1,7 +1,11 @@ ASDF: another system definition facility ======================================== -If you want to use ASDF, read our manual: +If you cloned our git repository, bootstrap a copy of build/asdf.lisp with: + make + + +To use ASDF, read our manual: http://common-lisp.net/project/asdf/asdf.html @@ -11,10 +15,11 @@ will get you started as a simple user. If you want to define your own systems, further read the section Defining systems with defsystem. + More information and additional links can be found on ASDF's home page at: http://common-lisp.net/project/asdf/ -last updated Wednesday; May 5, 2010 +Last updated Monday, Jan 28, 2013. diff --git a/asdf.asd b/asdf.asd index 0e27701b..d6b610d7 100644 --- a/asdf.asd +++ b/asdf.asd @@ -19,6 +19,10 @@ :components ((:file "header"))) +#+asdf3 +(defsystem :asdf/driver + :depends-on (:asdf-driver)) + #+asdf3 (defsystem :asdf/defsystem :licence "MIT" @@ -28,7 +32,7 @@ :build-operation monolithic-concatenate-source-op :build-pathname "build/asdf" ;; our target :around-compile call-without-redefinition-warnings ;; we need be the same as asdf-driver - :depends-on (:asdf/header :asdf-driver) + :depends-on (:asdf/header :asdf/driver) :encoding :utf-8 :components ((:file "upgrade") @@ -62,7 +66,7 @@ :licence "MIT" :description "Another System Definition Facility" :long-description "ASDF builds Common Lisp software organized into defined systems." - :version "2.26.162" ;; to be automatically updated by make bump-version + :version "2.26.163" ;; 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. diff --git a/doc/index.html b/doc/index.html index 314ec431..cf9e48b4 100644 --- a/doc/index.html +++ b/doc/index.html @@ -69,7 +69,7 @@ or its polar opposite, Drew McDermott's YTools - (trying maintain coherence of the current Lisp image at a fine grain), + (trying to maintain coherence of the current Lisp image at a fine grain), or the newcomer ASDlite (a somewhat improved incompatible variant of ASDF 1). diff --git a/find-system.lisp b/find-system.lisp index 81cdc8f8..c36ae2d2 100644 --- a/find-system.lisp +++ b/find-system.lisp @@ -18,7 +18,7 @@ #:find-system-if-being-defined #:*systems-being-defined* #:contrib-sysdef-search #:sysdef-find-asdf ;; backward compatibility symbols, functions removed #:system-find-preloaded-system #:register-preloaded-system #:*preloaded-systems* - #:make-defined-systems-table #:*defined-systems* + #:clear-defined-systems #:*defined-systems* ;; defined in source-registry, but specially mentioned here: #:initialize-source-registry #:sysdef-source-registry-search)) (in-package :asdf/find-system) @@ -251,19 +251,20 @@ Going forward, we recommend new users should be using the source-registry. (defun* load-asd (pathname &key name (external-format (encoding-external-format (detect-encoding pathname)))) ;; Tries to load system definition with canonical NAME from PATHNAME. (with-system-definitions () - (let ((*package* (find-package :asdf-user)) - (*default-pathname-defaults* - ;; resolve logical-pathnames so they won't wreak havoc in parsing namestrings. - (pathname-directory-pathname (translate-logical-pathname pathname)))) - (handler-bind - ((error #'(lambda (condition) - (error 'load-system-definition-error - :name name :pathname pathname - :condition condition)))) - (asdf-message (compatfmt "~&~@<; ~@;Loading system definition~@[ for ~A~] from ~A~@:>~%") - name pathname) - (with-muffled-loader-conditions () - (load* pathname :external-format external-format)))))) + (with-standard-io-syntax + (let ((*package* (find-package :asdf-user)) + (*default-pathname-defaults* + ;; resolve logical-pathnames so they won't wreak havoc in parsing namestrings. + (pathname-directory-pathname (translate-logical-pathname pathname)))) + (handler-bind + ((error #'(lambda (condition) + (error 'load-system-definition-error + :name name :pathname pathname + :condition condition)))) + (asdf-message (compatfmt "~&~@<; ~@;Loading system definition~@[ for ~A~] from ~A~@:>~%") + name pathname) + (with-muffled-loader-conditions () + (load* pathname :external-format external-format))))))) (defun* locate-system (name) "Given a system NAME designator, try to locate where to load the system from. @@ -341,3 +342,4 @@ PREVIOUS-TIME when not null is the time at which the PREVIOUS system was loaded. (register-preloaded-system "asdf") (register-preloaded-system "asdf-driver") + diff --git a/header.lisp b/header.lisp index 90cfafeb..e7fd30f6 100644 --- a/header.lisp +++ b/header.lisp @@ -1,5 +1,5 @@ ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*- -;;; This is ASDF 2.26.162: Another System Definition Facility. +;;; This is ASDF 2.26.163: Another System Definition Facility. ;;; ;;; Feedback, bug reports, and patches are all welcome: ;;; please mail to . @@ -54,7 +54,7 @@ (declaim (optimize (speed 1) (safety 3) (debug 3))) (setf ext:*gc-verbose* nil)) -#+(or abcl clisp cmu) +#+(or abcl clisp) ;; cmu (eval-when (:load-toplevel :compile-toplevel :execute) (unless (member :asdf3 *features*) (let* ((existing-version diff --git a/interface.lisp b/interface.lisp index f1d34431..cd4f7746 100644 --- a/interface.lisp +++ b/interface.lisp @@ -47,6 +47,7 @@ #:monolithic-compile-concatenated-source-op #:monolithic-load-compiled-concatenated-source-op #:operation-monolithic-p + #:required-components #:component #:parent-component #:child-component #:system #:module #:file-component #:source-file #:c-source-file #:java-source-file diff --git a/plan.lisp b/plan.lisp index e62e87c9..59dfabf0 100644 --- a/plan.lisp +++ b/plan.lisp @@ -6,7 +6,7 @@ (:use :asdf/common-lisp :asdf/driver :asdf/upgrade :asdf/component :asdf/operation :asdf/system :asdf/cache :asdf/find-system :asdf/find-component - :asdf/operation :asdf/action) + :asdf/operation :asdf/action :asdf/lisp-action) (:export #:component-operation-time #:mark-operation-done #:plan-traversal #:sequential-plan #:*default-plan-class* @@ -421,7 +421,8 @@ processed in order by OPERATE.")) (traverse-action plan o c t)) (plan-actions plan))) -(defmethod traverse-sub-actions (operation component &rest keys &key &allow-other-keys) +(define-convenience-action-methods traverse-sub-actions (o c &key)) +(defmethod traverse-sub-actions ((operation operation) (component component) &rest keys &key &allow-other-keys) (apply 'traverse-actions (direct-dependencies operation component) :system (component-system component) keys)) @@ -434,6 +435,6 @@ processed in order by OPERATE.")) (defmethod required-components (system &rest keys &key (goal-operation 'load-op) &allow-other-keys) (remove-duplicates - (mapcar 'cdr (apply 'traverse-sub-actions (make-operation goal-operation) system keys)) + (mapcar 'cdr (apply 'traverse-sub-actions goal-operation system keys)) :from-end t)) diff --git a/test/run-tests.sh b/test/run-tests.sh index a7d22685..0c57aa8a 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -290,9 +290,9 @@ valid_upgrade_test_p () { # my old ubuntu clisp 2.44.1 is wired in with an antique ASDF 1 from CLC that can't be downgraded. # 2.00[0-7] use UID, which fails on that CLISP and was removed afterwards. # Note that for the longest time, CLISP has included 2.011 in its distribution. - : ;; - cmucl:1.*|cmucl:2.00*|cmucl:2.01[0-4]:*) - : Skip, CMUCL has problems before 2.014.7 due to source-registry upgrade ;; + cmucl:1.*|cmucl:2.00*|cmucl:2.01[0-7]:*) + : Skip, CMUCL has problems before 2.014.7 due to source-registry upgrade + : Weird unidentified problems before 2.018 ;; ecl*:1.*|ecl*:2.0[01]*|ecl*:2.20:*) : Skip, because of various ASDF issues ;; gcl:1.*|gcl:2.0*|gcl:2.2[0-6]*) : Skip old versions that do not support GCL 2.6 ;; @@ -316,7 +316,7 @@ run_upgrade_tests () { "'(#.(load\"$su\")#.(in-package :asdf-test)#.(test-upgrade $method \"$tag\"))" || { echo "upgrade FAILED for $lisp from $tag using method $method" ; echo "you can retry just that test with:" ; - echo ASDF_UPGRADE_TEST_TAGS=\"$tag\" ADSF_UPGRADE_TEST_METHODS=\"$method\" ./test/run-tests.sh -u $lisp ; + echo ASDF_UPGRADE_TEST_TAGS=\"$tag\" ASDF_UPGRADE_TEST_METHODS=\"$method\" ./test/run-tests.sh -u $lisp ; echo "or more interactively (and maybe with rlwrap or in emacs), start with:" echo "$cmd" echo "then copy/paste:" diff --git a/test/test-retry-loading-component-1.script b/test/test-retry-loading-component-1.script index a6e87dcc..ee4486f7 100644 --- a/test/test-retry-loading-component-1.script +++ b/test/test-retry-loading-component-1.script @@ -2,30 +2,19 @@ ;;; test asdf:try-recompiling restart - - (defvar *caught-error* nil) -(progn - (DBG "trlc1 1") - (asdf::delete-file-if-exists "try-reloading-dependency.asd") - (setf asdf::*defined-systems* (asdf::make-defined-systems-table)) - (DBG "trlc1 2") - (handler-bind ((error (lambda (c) - (format t "~&Caught error ~s" c) - (setf *caught-error* t) - (asdf::concatenate-files - '("try-reloading-dependency.hidden") - "try-reloading-dependency.asd") - (DBG "trlc1 5") - (multiple-value-bind (name mode) - (find-symbol (symbol-name 'retry) :asdf) - (DBG "trlc1 6" name mode) - (assert (eq mode :external) nil "Mode of ~s was not external" name) - (let ((restart (find-restart name c))) - (DBG "trlc1 7" name restart) - (assert restart) - (when restart (invoke-restart restart))))))) - (DBG "trlc1 3") - (asdf:oos 'asdf:load-op 'try-reloading-1)) - (DBG "trlc1 4") - (assert *caught-error*)) +(delete-file-if-exists "try-reloading-dependency.asd") +(asdf::clear-defined-systems) +(handler-bind + ((error #'(lambda (c) + (format t "~&Caught error ~s" c) + (setf *caught-error* t) + (concatenate-files '("try-reloading-dependency.hidden") "try-reloading-dependency.asd") + (DBG "trlc1 5") + (multiple-value-bind (name mode) (find-symbol* :retry :asdf) + (assert (eq mode :external) () "Mode of ~s was not external" name) + (let ((restart (find-restart name c))) + (assert restart) + (when restart (invoke-restart restart))))))) + (load-system 'try-reloading-1)) +(assert *caught-error*) diff --git a/upgrade.lisp b/upgrade.lisp index d679faa1..c6718aca 100644 --- a/upgrade.lisp +++ b/upgrade.lisp @@ -54,7 +54,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO ;; "3.4.5.67" would be a development version in the official upstream of 3.4.5. ;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5 ;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67 - (asdf-version "2.26.162") + (asdf-version "2.26.163") (existing-version (asdf-version))) (when (and existing-version (not (equal asdf-version existing-version))) (push existing-version *previous-asdf-versions*) diff --git a/utility.lisp b/utility.lisp index 9ab5415c..370ece0f 100644 --- a/utility.lisp +++ b/utility.lisp @@ -350,8 +350,8 @@ in that it doesn't print back to itself, but the list is returned anyway." If major versions differ, it's not compatible. If they are equal, then any later version is compatible, with later being determined by a lexicographical comparison of minor numbers." - (let ((x (parse-version provided-version 'warn)) - (y (parse-version required-version 'warn))) + (let ((x (parse-version provided-version nil)) + (y (parse-version required-version nil))) (labels ((bigger (x y) (cond ((not y) t) ((not x) nil) diff --git a/version.lisp-expr b/version.lisp-expr index 22525740..18c63369 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -1 +1 @@ -"2.26.162" +"2.26.163" -- GitLab