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
========================================
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.
......@@ -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.
......
......@@ -69,7 +69,7 @@
or its polar opposite,
Drew McDermott's
<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
<a href="http://lisp.ystok.ru/asdlite/">ASDlite</a>
(a somewhat improved incompatible variant of ASDF 1).
......
......@@ -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")
;;; -*- 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 <asdf-devel@common-lisp.net>.
......@@ -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
......
......@@ -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
......
......@@ -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))
......@@ -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:"
......
......@@ -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*)
......@@ -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*)
......
......@@ -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)
......
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