Commit 1746c46b authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

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.
parent ab797258
ASDF: another system definition facility 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 http://common-lisp.net/project/asdf/asdf.html
...@@ -11,10 +15,11 @@ will get you started as a simple user. ...@@ -11,10 +15,11 @@ will get you started as a simple user.
If you want to define your own systems, further read the section If you want to define your own systems, further read the section
Defining systems with defsystem. Defining systems with defsystem.
More information and additional links can be found on ASDF's More information and additional links can be found on ASDF's
home page at: home page at:
http://common-lisp.net/project/asdf/ http://common-lisp.net/project/asdf/
last updated Wednesday; May 5, 2010 Last updated Monday, Jan 28, 2013.
...@@ -19,6 +19,10 @@ ...@@ -19,6 +19,10 @@
:components :components
((:file "header"))) ((:file "header")))
#+asdf3
(defsystem :asdf/driver
:depends-on (:asdf-driver))
#+asdf3 #+asdf3
(defsystem :asdf/defsystem (defsystem :asdf/defsystem
:licence "MIT" :licence "MIT"
...@@ -28,7 +32,7 @@ ...@@ -28,7 +32,7 @@
:build-operation monolithic-concatenate-source-op :build-operation monolithic-concatenate-source-op
:build-pathname "build/asdf" ;; our target :build-pathname "build/asdf" ;; our target
:around-compile call-without-redefinition-warnings ;; we need be the same as asdf-driver :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 :encoding :utf-8
:components :components
((:file "upgrade") ((:file "upgrade")
...@@ -62,7 +66,7 @@ ...@@ -62,7 +66,7 @@
:licence "MIT" :licence "MIT"
:description "Another System Definition Facility" :description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems." :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 () :depends-on ()
#+asdf3 :encoding #+asdf3 :utf-8 #+asdf3 :encoding #+asdf3 :utf-8
;; For most purposes, asdf itself specially counts as a builtin system. ;; For most purposes, asdf itself specially counts as a builtin system.
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
or its polar opposite, or its polar opposite,
Drew McDermott's Drew McDermott's
<a href="http://cs-www.cs.yale.edu/homes/dvm/">YTools</a> <a href="http://cs-www.cs.yale.edu/homes/dvm/">YTools</a>
(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 or the newcomer
<a href="http://lisp.ystok.ru/asdlite/">ASDlite</a> <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).
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#:find-system-if-being-defined #:*systems-being-defined* #:find-system-if-being-defined #:*systems-being-defined*
#:contrib-sysdef-search #:sysdef-find-asdf ;; backward compatibility symbols, functions removed #:contrib-sysdef-search #:sysdef-find-asdf ;; backward compatibility symbols, functions removed
#:system-find-preloaded-system #:register-preloaded-system #:*preloaded-systems* #: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: ;; defined in source-registry, but specially mentioned here:
#:initialize-source-registry #:sysdef-source-registry-search)) #:initialize-source-registry #:sysdef-source-registry-search))
(in-package :asdf/find-system) (in-package :asdf/find-system)
...@@ -251,19 +251,20 @@ Going forward, we recommend new users should be using the source-registry. ...@@ -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)))) (defun* load-asd (pathname &key name (external-format (encoding-external-format (detect-encoding pathname))))
;; Tries to load system definition with canonical NAME from PATHNAME. ;; Tries to load system definition with canonical NAME from PATHNAME.
(with-system-definitions () (with-system-definitions ()
(let ((*package* (find-package :asdf-user)) (with-standard-io-syntax
(*default-pathname-defaults* (let ((*package* (find-package :asdf-user))
;; resolve logical-pathnames so they won't wreak havoc in parsing namestrings. (*default-pathname-defaults*
(pathname-directory-pathname (translate-logical-pathname pathname)))) ;; resolve logical-pathnames so they won't wreak havoc in parsing namestrings.
(handler-bind (pathname-directory-pathname (translate-logical-pathname pathname))))
((error #'(lambda (condition) (handler-bind
(error 'load-system-definition-error ((error #'(lambda (condition)
:name name :pathname pathname (error 'load-system-definition-error
:condition condition)))) :name name :pathname pathname
(asdf-message (compatfmt "~&~@<; ~@;Loading system definition~@[ for ~A~] from ~A~@:>~%") :condition condition))))
name pathname) (asdf-message (compatfmt "~&~@<; ~@;Loading system definition~@[ for ~A~] from ~A~@:>~%")
(with-muffled-loader-conditions () name pathname)
(load* pathname :external-format external-format)))))) (with-muffled-loader-conditions ()
(load* pathname :external-format external-format)))))))
(defun* locate-system (name) (defun* locate-system (name)
"Given a system NAME designator, try to locate where to load the system from. "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. ...@@ -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")
(register-preloaded-system "asdf-driver") (register-preloaded-system "asdf-driver")
;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*- ;;; -*- 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: ;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>. ;;; please mail to <asdf-devel@common-lisp.net>.
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
(declaim (optimize (speed 1) (safety 3) (debug 3))) (declaim (optimize (speed 1) (safety 3) (debug 3)))
(setf ext:*gc-verbose* nil)) (setf ext:*gc-verbose* nil))
#+(or abcl clisp cmu) #+(or abcl clisp) ;; cmu
(eval-when (:load-toplevel :compile-toplevel :execute) (eval-when (:load-toplevel :compile-toplevel :execute)
(unless (member :asdf3 *features*) (unless (member :asdf3 *features*)
(let* ((existing-version (let* ((existing-version
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#:monolithic-compile-concatenated-source-op #:monolithic-compile-concatenated-source-op
#:monolithic-load-compiled-concatenated-source-op #:monolithic-load-compiled-concatenated-source-op
#:operation-monolithic-p #:operation-monolithic-p
#:required-components
#:component #:parent-component #:child-component #:system #:module #:component #:parent-component #:child-component #:system #:module
#:file-component #:source-file #:c-source-file #:java-source-file #:file-component #:source-file #:c-source-file #:java-source-file
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
(:use :asdf/common-lisp :asdf/driver :asdf/upgrade (:use :asdf/common-lisp :asdf/driver :asdf/upgrade
:asdf/component :asdf/operation :asdf/system :asdf/component :asdf/operation :asdf/system
:asdf/cache :asdf/find-system :asdf/find-component :asdf/cache :asdf/find-system :asdf/find-component
:asdf/operation :asdf/action) :asdf/operation :asdf/action :asdf/lisp-action)
(:export (:export
#:component-operation-time #:mark-operation-done #:component-operation-time #:mark-operation-done
#:plan-traversal #:sequential-plan #:*default-plan-class* #:plan-traversal #:sequential-plan #:*default-plan-class*
...@@ -421,7 +421,8 @@ processed in order by OPERATE.")) ...@@ -421,7 +421,8 @@ processed in order by OPERATE."))
(traverse-action plan o c t)) (traverse-action plan o c t))
(plan-actions plan))) (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) (apply 'traverse-actions (direct-dependencies operation component)
:system (component-system component) keys)) :system (component-system component) keys))
...@@ -434,6 +435,6 @@ processed in order by OPERATE.")) ...@@ -434,6 +435,6 @@ processed in order by OPERATE."))
(defmethod required-components (system &rest keys &key (goal-operation 'load-op) &allow-other-keys) (defmethod required-components (system &rest keys &key (goal-operation 'load-op) &allow-other-keys)
(remove-duplicates (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)) :from-end t))
...@@ -290,9 +290,9 @@ valid_upgrade_test_p () { ...@@ -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. # 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. # 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. # Note that for the longest time, CLISP has included 2.011 in its distribution.
: ;; cmucl:1.*|cmucl:2.00*|cmucl:2.01[0-7]:*)
cmucl:1.*|cmucl:2.00*|cmucl:2.01[0-4]:*) : Skip, CMUCL has problems before 2.014.7 due to source-registry upgrade
: 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:*) ecl*:1.*|ecl*:2.0[01]*|ecl*:2.20:*)
: Skip, because of various ASDF issues ;; : 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 ;; 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 () { ...@@ -316,7 +316,7 @@ run_upgrade_tests () {
"'(#.(load\"$su\")#.(in-package :asdf-test)#.(test-upgrade $method \"$tag\"))" || "'(#.(load\"$su\")#.(in-package :asdf-test)#.(test-upgrade $method \"$tag\"))" ||
{ echo "upgrade FAILED for $lisp from $tag using method $method" ; { echo "upgrade FAILED for $lisp from $tag using method $method" ;
echo "you can retry just that test with:" ; 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 "or more interactively (and maybe with rlwrap or in emacs), start with:"
echo "$cmd" echo "$cmd"
echo "then copy/paste:" echo "then copy/paste:"
......
...@@ -2,30 +2,19 @@ ...@@ -2,30 +2,19 @@
;;; test asdf:try-recompiling restart ;;; test asdf:try-recompiling restart
(defvar *caught-error* nil) (defvar *caught-error* nil)
(progn (delete-file-if-exists "try-reloading-dependency.asd")
(DBG "trlc1 1") (asdf::clear-defined-systems)
(asdf::delete-file-if-exists "try-reloading-dependency.asd") (handler-bind
(setf asdf::*defined-systems* (asdf::make-defined-systems-table)) ((error #'(lambda (c)
(DBG "trlc1 2") (format t "~&Caught error ~s" c)
(handler-bind ((error (lambda (c) (setf *caught-error* t)
(format t "~&Caught error ~s" c) (concatenate-files '("try-reloading-dependency.hidden") "try-reloading-dependency.asd")
(setf *caught-error* t) (DBG "trlc1 5")
(asdf::concatenate-files (multiple-value-bind (name mode) (find-symbol* :retry :asdf)
'("try-reloading-dependency.hidden") (assert (eq mode :external) () "Mode of ~s was not external" name)
"try-reloading-dependency.asd") (let ((restart (find-restart name c)))
(DBG "trlc1 5") (assert restart)
(multiple-value-bind (name mode) (when restart (invoke-restart restart)))))))
(find-symbol (symbol-name 'retry) :asdf) (load-system 'try-reloading-1))
(DBG "trlc1 6" name mode) (assert *caught-error*)
(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*))
...@@ -54,7 +54,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO ...@@ -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.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.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 ;; "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))) (existing-version (asdf-version)))
(when (and existing-version (not (equal asdf-version existing-version))) (when (and existing-version (not (equal asdf-version existing-version)))
(push existing-version *previous-asdf-versions*) (push existing-version *previous-asdf-versions*)
......
...@@ -350,8 +350,8 @@ in that it doesn't print back to itself, but the list is returned anyway." ...@@ -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 major versions differ, it's not compatible.
If they are equal, then any later version is compatible, If they are equal, then any later version is compatible,
with later being determined by a lexicographical comparison of minor numbers." with later being determined by a lexicographical comparison of minor numbers."
(let ((x (parse-version provided-version 'warn)) (let ((x (parse-version provided-version nil))
(y (parse-version required-version 'warn))) (y (parse-version required-version nil)))
(labels ((bigger (x y) (labels ((bigger (x y)
(cond ((not y) t) (cond ((not y) t)
((not x) nil) ((not x) nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment