diff --git a/asdf.asd b/asdf.asd index e36a34e9293edad17bc1cee717b66a725d1bf3ad..3fba33a41e8f4c1b2fad09ee8ec9e6393d991750 100644 --- a/asdf.asd +++ b/asdf.asd @@ -15,7 +15,7 @@ :licence "MIT" :description "Another System Definition Facility" :long-description "ASDF builds Common Lisp software organized into defined systems." - :version "2.26.98" ;; to be automatically updated by bin/bump-revision + :version "2.26.99" ;; to be automatically updated by bin/bump-revision :depends-on () :components ((:module "build" :components ((:file "asdf")))) :in-order-to (#+asdf2.27 (compile-op (monolithic-load-concatenated-source-op generate-asdf)))) diff --git a/header.lisp b/header.lisp index f1bccd1597c32314bdd04310c65d7f21a62343b9..b878ff31581f30df60ff6461fc456e508401bfa9 100644 --- a/header.lisp +++ b/header.lisp @@ -1,5 +1,5 @@ ;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; coding: utf-8 -*- -;;; This is ASDF 2.26.98: Another System Definition Facility. +;;; This is ASDF 2.26.99: Another System Definition Facility. ;;; ;;; Feedback, bug reports, and patches are all welcome: ;;; please mail to . diff --git a/package.lisp b/package.lisp index 43bbea2a3a66a2c1a0674e945d8927fb8e43ae39..37535648834249bf0be68221f776b27d5144ac76 100644 --- a/package.lisp +++ b/package.lisp @@ -299,16 +299,16 @@ or when loading the package is optional." (setf *package-fishiness* nil))) (defun record-fishy (info) (push info *package-fishiness*)) - (macrolet ((when-fishy (&body body) - `(when *all-package-fishiness* ,@body)) - (fishy (&rest info) - `(when-fishy (record-fishy (list ,@info))))) - (defun ensure-package (name &key - nicknames documentation use - shadow shadowing-import-from - import-from export intern - recycle mix reexport - unintern) + (defun ensure-package (name &key + nicknames documentation use + shadow shadowing-import-from + import-from export intern + recycle mix reexport + unintern) + (macrolet ((when-fishy (&body body) + `(when *all-package-fishiness* ,@body)) + (fishy (&rest info) + `(when-fishy (record-fishy (list ,@info))))) (let* ((name (string name)) (nicknames (mapcar #'string nicknames)) (names (cons name nicknames)) @@ -579,15 +579,18 @@ or when loading the package is optional." (apply 'ensure-package ',(parse-define-package-form package clauses)))) -;;; Final tricks to keep various implementations happier +;;;; Final tricks to keep various implementations happy. (eval-when (:load-toplevel :compile-toplevel :execute) #+allegro (setf excl::*autoload-package-name-alist* (remove "asdf" excl::*autoload-package-name-alist* :test 'equalp :key 'car)) ; We need that BEFORE any mention of package ASDF. - (unless (member :asdf2.27 *features*) - #+(or clisp xcl) - (progn - (when (find-package :asdf) - (delete-package* :asdf t)) - (make-package :asdf :use ())))) + #+(or clisp xcl) + (unless (let ((vs (find-symbol* 'version-satisfies :asdf nil)) + (av (find-symbol* 'asdf-version :asdf nil))) + (and vs av (funcall vs (funcall av) "2.26.59"))) + (when (find-package :asdf) + (delete-package* :asdf t)) + (make-package :asdf :use ()))) + + diff --git a/pathname.lisp b/pathname.lisp index 9b062848f33aa84746b7e179740adcfc2b45e6de..962e298777f357fe39dad87b3ee4c38bae1ee638 100644 --- a/pathname.lisp +++ b/pathname.lisp @@ -271,7 +271,7 @@ actually-existing directory." :defaults defaults)) (defmacro with-pathname-defaults ((&optional defaults) &body body) - `(let ((*default-pathname-defaults* ,(or defaults (nil-pathname)))) ,@body)) + `(let ((*default-pathname-defaults* ,(or defaults '(nil-pathname)))) ,@body)) (defun* truename* (p) ;; avoids both logical-pathname merging and physical resolution issues diff --git a/test/run-tests.sh b/test/run-tests.sh index 1bf21f0397c5649a6ed4ec125f86e701450d1bac..57c41ce3235fb46c3245af177d10a61b2e0887a8 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -211,20 +211,34 @@ upgrade_tags () { if [ -n "$TEST_ASDF_TAGS" ] ; then echo $TEST_ASDF_TAGS ; return fi + # REQUIRE is a magic tag meaning whatever your implementation provides # 1.37 is the last release by Daniel Barlow # 1.97 is the last release before Gary King takes over # 1.369 is the last release by Gary King # 2.000 to 2.019 and 2.20 to 2.27 and beyond are Faré's "stable" releases - echo 1.37 1.97 1.369 + # 2.26.61 is the last single-package ASDF. + echo REQUIRE 1.37 1.97 1.369 2.26.61 git tag -l '2.0??' git tag -l '2.??' } +upgrade_methods () { + if [ -n "$TEST_ASDF_METHODS" ] ; then + echo $TEST_ASDF_METHODS ; return + fi + cat < $file ;; *) echo "Don't know how to extract asdf.lisp for version $tag" @@ -243,7 +257,7 @@ 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 ;; ecl*:1.*|ecl*:2.0[01]*|ecl*:2.20:*) @@ -256,16 +270,17 @@ valid_upgrade_test_p () { *) return 0 ;; esac return 1 -} +} run_upgrade_tests () { su=test/script-support.lisp - lv="$command $eval (load\"$su\") $eval" ; for tag in `upgrade_tags` ; do - for x in load-asdf-system load-asdf-lisp compile-load-asdf load-asdf-fasl just-load-asdf-fasl ; do - if valid_upgrade_test_p $lisp $tag $x ; then - echo "Testing upgrade from ASDF ${tag} using method $x" ; - $lv "(asdf-test::test-upgrade 'asdf-test::$x \"$tag\")" || - { echo "upgrade FAILED for $lisp from $tag using method $x" ; exit 1 ;} + for method in `upgrade_methods` ; do + if valid_upgrade_test_p $lisp $tag $method ; then + echo "Testing ASDF upgrade from ${tag} using method $method" + extract_tagged_asdf $tag + $command $eval \ + "'(#.(load\"$su\")#.(in-package :asdf-test)#.(test-upgrade $method \"$tag\"))" || + { echo "upgrade FAILED for $lisp from $tag using method $method" ; exit 1 ;} fi ; done ; done 2>&1 | tee build/results/${lisp}-upgrade.text } run_tests () { diff --git a/test/script-support.lisp b/test/script-support.lisp index 51ea0765e8aa42dd02d9916ce7c065d60575658f..e3f9c9606177fba4c09f54e34cea0ba099cb672c 100644 --- a/test/script-support.lisp +++ b/test/script-support.lisp @@ -345,13 +345,20 @@ is bound, write a message and exit on an error. If (register-directory *test-directory*) (acall :oos (asym :load-op) x :verbose verbose))) -(defun test-upgrade (method tag) ;; called by run-test +(defun test-upgrade (old-method new-method tag) ;; called by run-test (with-test () - (unless (eq method 'just-load-asdf-fasl) - (format t "Loading old asdf ~A~%" tag) - (load-asdf-lisp tag)) - (format t "Loading new asdf with method ~A~%" method) - (funcall method) + (when old-method + (cond + ((equal tag "REQUIRE") + (format t "Requiring some previous asdf ~A~%" tag) + (ignore-errors (funcall 'require "asdf")) + (unless (member "ASDF" *modules* :test 'equal) + (leave-test "Your Lisp implementation does not provide ASDF. Skipping test.~%" 0))) + (t + (format t "Loading old asdf ~A via ~A~%" tag old-method) + (funcall old-method tag)))) + (format t "Now loading new asdf via method ~A~%" new-method) + (funcall new-method) (format t "Testing it~%") (register-directory *test-directory*) (load-test-system :test-module-depend) diff --git a/upgrade.lisp b/upgrade.lisp index be262b5c1e1a5bab6a1b39b1322c7e378442ddc8..e8f6088cd0fe6a469d9e9d7153a1cb92f514707b 100644 --- a/upgrade.lisp +++ b/upgrade.lisp @@ -35,7 +35,7 @@ ;; "2.345.6" would be a development version in the official upstream ;; "2.345.0.7" would be your seventh local modification of official release 2.345 ;; "2.345.6.7" would be your seventh local modification of development version 2.345.6 - (asdf-version "2.26.98") + (asdf-version "2.26.99") (existing-asdf (find-class (find-symbol* :component :asdf nil) nil)) (existing-version *asdf-version*) (already-there (equal asdf-version existing-version))) diff --git a/utility.lisp b/utility.lisp index c0512481b28dbb151b0ea34e508b698b369c112c..3e1cc79fd635613d9ecd37c23c75a47ec20a3970 100644 --- a/utility.lisp +++ b/utility.lisp @@ -34,7 +34,7 @@ (defun undefine-function (function-spec) (cond ((symbolp function-spec) - #+clisp + #+(and clisp (or)) (let ((f (and (fboundp function-spec) (fdefinition function-spec)))) (when (typep f 'clos:standard-generic-function) (loop :for m :in (clos:generic-function-methods f) @@ -51,7 +51,12 @@ ((defdef (def* def) `(defmacro ,def* (name formals &rest rest) `(progn - #-clisp ;; clisp is unhappy about fmakunbound. + ;; undefining the previous function is the portable way + ;; of overriding any incompatible previous gf, but somehow + ;; this causes CLISP to fail to see COMPONENT-NAME methods after ugprade + ;; so instead, for CLISP we delete-package* in package.lisp + ;; any time the API changes. + #-clisp (undefine-function ',name) #-gcl ; gcl 2.7.0 notinline functions lose secondary return values :-( ,@(when (and #+ecl (symbolp name)) ; fails for setf functions on ecl diff --git a/version.lisp-expr b/version.lisp-expr index 11a7c42870dcf3c6d06eea1bab705556bf5d9d99..ed17e9f99b40a5ca45c76698100819130c63032c 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -1 +1 @@ -"2.26.98" +"2.26.99"