diff --git a/Makefile b/Makefile index 57e064abc249009b670e6d1eccda0d3b21bf219f..8b903c055e4034f3747629340b6edc43c383bea4 100644 --- a/Makefile +++ b/Makefile @@ -103,13 +103,13 @@ mrproper: clean test-upgrade: build/asdf.lisp ./test/run-tests.sh -u ${lisp} -test-compile: build/asdf.lisp - ${SBCL} --noinform --no-userinit --no-sysinit --load build/asdf.lisp --load test/script-support.lisp --eval '(asdf-test::exit-lisp 0)' 2>&1 | cmp - /dev/null +test-clean-load: build/asdf.lisp + ./test/run-tests.sh -c ${lisp} test-lisp: build/asdf.lisp @cd test; ${MAKE} clean;./run-tests.sh ${lisp} ${test-glob} -test: test-lisp test-compile doc +test: test-lisp test-clean-load doc test-all-lisps: @for lisp in ${lisps} ; do \ diff --git a/asdf.asd b/asdf.asd index 36c1c4e6650123cbef49d73ece5bbe83cd5f7b2f..4818b35f6d695697bdf0245c2fbb7c5c1a3a598a 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.82" ;; to be automatically updated by bin/bump-revision + :version "2.26.83" ;; 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/configuration.lisp b/configuration.lisp index 36ec82886b698aeaad901bdb5eae1262d68ec52b..9a859f6b22801a80943dfc12673e89021eff7454 100644 --- a/configuration.lisp +++ b/configuration.lisp @@ -180,7 +180,7 @@ values of TAG include :source-registry and :output-translations." (coerce-pathname (hostname) :type :directory))))) (when (absolute-pathname-p r) (error (compatfmt "~@") x)) - (if (or (pathnamep x) (not wilden)) r (wilden r)))) + (if (or (pathnamep x) (symbolp x) (not wilden)) r (wilden r)))) (defvar *here-directory* nil "This special variable is bound to the currect directory during calls to @@ -231,7 +231,7 @@ directive.") (error "Using the :system-cache is deprecated. ~%~ Please remove it from your ASDF configuration")) ((eql :default-directory) (default-directory)))) - (s (if (and wilden (not (pathnamep x))) + (s (if (and wilden (not (or (pathnamep x) (symbolp x)))) (wilden r) r))) (unless (absolute-pathname-p s) diff --git a/header.lisp b/header.lisp index 6116199274635f3b030f54240992f7b869cb470e..34f588da8a7c74e7efef95227450923a9abf1034 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.82: Another System Definition Facility. +;;; This is ASDF 2.26.83: Another System Definition Facility. ;;; ;;; Feedback, bug reports, and patches are all welcome: ;;; please mail to . diff --git a/lisp-build.lisp b/lisp-build.lisp index 7342f20a101df9ad35b57bafba57684be3036467..92098647f458300107f36d6441dcb037688215a7 100644 --- a/lisp-build.lisp +++ b/lisp-build.lisp @@ -292,17 +292,19 @@ for processing later (possibly in a different process)." (defun* compile-file-keeping-object (input-file &rest keys &key output-file &allow-other-keys) (#+ecl if #+ecl (use-ecl-byte-compiler-p) #+ecl (apply 'compile-file* input-file keys) #+mkcl progn - (multiple-value-bind (object-file flags1 flags2) - (apply 'compile-file* input-file - #+ecl :system-p #+ecl t #+mkcl :fasl-p #+mkcl nil - :output-file (compile-file-pathname - output-file . #+ecl (:type :object) #+mkcl (:fasl-p nil)) keys) - (values (and object-file + (let ((object-file + (apply 'compile-file-pathname + output-file #+ecl :type #+ecl :object #+mkcl :fasl-p #+mkcl nil))) + (multiple-value-bind (result flags1 flags2) + (apply 'compile-file* input-file + #+ecl :system-p #+ecl t #+mkcl :fasl-p #+mkcl nil + :output-file object-file keys) + (values (and (equal result object-file) (compiler::build-fasl output-file #+ecl :lisp-files #+mkcl :lisp-object-files (list object-file)) object-file) flags1 - flags2))))) + flags2)))))) ;;; Links FASLs together (defun* combine-fasls (inputs output) diff --git a/package.lisp b/package.lisp index 8aa51f9b03db98300aed84e6211235ca3156b239..493b07213a02d25a39688040c9bf7f8accfe8d5b 100644 --- a/package.lisp +++ b/package.lisp @@ -154,7 +154,7 @@ or when loading the package is optional." ;;; Communicable representation of symbol and package information (eval-when (:load-toplevel :compile-toplevel :execute) - (defun package-definition-form (package-designator &key internp (error t)) + (defun package-definition-form (package-designator &key internp (nicknamesp t) (error t)) (let* ((package (find-package* package-designator error)) (name (package-name package)) (nicknames (package-nicknames package)) @@ -198,7 +198,7 @@ or when loading the package is optional." (loop :for i :in (sort-names (table-keys table)) :collect `(,key ,i ,@(sort-names (gethash i table)))))) `(defpackage ,name - ,@(when-relevant :nicknames (sort-names nicknames)) + ,@(when-relevant :nicknames (and nicknamesp (sort-names nicknames))) (:use ,@(sort-names use)) ,@(when-relevant :shadow (sort-names shadow)) ,@(import-options :shadowing-import-from shadowing-import) @@ -423,7 +423,7 @@ or when loading the package is optional." #+(or ecl gcl) (defpackage ,package (:use)) #+clisp (macrolet ((foo () (apply 'ensure-package ',(parse-define-package-form package clauses)) - (package-definition-form ',package))) + (package-definition-form ',package :nicknamesp nil))) (foo)) (apply 'ensure-package ',(parse-define-package-form package clauses)))) diff --git a/test/run-tests.sh b/test/run-tests.sh index 64c0e566182614f66203dae2e1fa80370f52c3cc..d33559946100a2a49d05a5e7cf5987b56d45cec4 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -19,9 +19,9 @@ usage () { echo " -u -- upgrade tests." } -unset DEBUG_ASDF_TEST upgrade +unset DEBUG_ASDF_TEST upgrade clean_load -while getopts "duh" OPTION +while getopts "duhc" OPTION do case $OPTION in d) @@ -30,6 +30,9 @@ do u) upgrade=t ;; + c) + clean_load=t + ;; h) usage exit 1 @@ -56,6 +59,7 @@ DO () { ( set -x ; "$@" ); } do_tests() { command="$1" eval="$2" + env | grep -i asdf rm -f ~/.cache/common-lisp/"`pwd`"/* || true ( cd .. && DO $command $eval '(or #.(load "test/script-support.lisp") #.(asdf-test::compile-asdf-script))' ) if [ $? -ne 0 ] ; then @@ -125,7 +129,7 @@ case "$lisp" in eval="--eval" ;; clisp) command="${CLISP:-clisp}" - flags="-norc -ansi -I " + flags="-norc --silent -ansi -I " nodebug="-on-error exit" eval="-x" ;; cmucl) @@ -185,7 +189,7 @@ case "$lisp" in exit 42 ;; esac -if ! type "$command" ; then +if ! type "$command" > /dev/null ; then echo "lisp implementation not found: $command" >&2 exit 43 fi @@ -193,7 +197,6 @@ fi ASDFDIR="$(cd .. ; /bin/pwd)" export CL_SOURCE_REGISTRY="${ASDFDIR}" export ASDF_OUTPUT_TRANSLATIONS="(:output-translations (\"${ASDFDIR}\" (\"${ASDFDIR}/build/fasls\" :implementation)) :ignore-inherited-configuration)" -env | grep asdf command="$command $flags" if [ -z "${DEBUG_ASDF_TEST}" ] ; then @@ -273,14 +276,37 @@ run_tests () { tee "../build/results/${lisp}.text" "../build/results/${lisp}-${thedate}.save" read a < ../build/results/status clean_up - [ success = "$a" ] ## exit code + if [ success = "$a" ] ; then ## exit code + return 0 + else + echo "To view full results and failures, try the following command:" >&2 + echo " less -p ABORTED build/results/${lisp}.text" >&2 + return 1 + fi } clean_up () { rm -rf ../build/test-source-registry-conf.d ../build/test-asdf-output-translations-conf.d } +test_clean_load () { + nop=build/results/${lisp}-nop.text + load=build/results/${lisp}-load.text + ${command} ${eval} \ + '(or #.(setf *load-verbose* nil) #.(load "test/script-support.lisp") #.(asdf-test::exit-lisp 0))' \ + > $nop 2>&1 + ${command} ${eval} \ + '(or #.(setf *load-verbose* nil) #.(load "build/asdf.lisp") #.(asdf/image:quit 0))' \ + > $load 2>&1 + if diff $nop $load ; then + echo "GOOD: Loading ASDF on $lisp produces no message" >&2 ; return 0 + else + echo "BAD: Loading ASDF on $lisp produces messages" >&2 ; return 1 + fi +} if [ -z "$command" ] ; then echo "Error: cannot find or do not know how to run Lisp named $lisp" +elif [ -n "$clean_load" ] ; then + test_clean_load elif [ -n "$upgrade" ] ; then run_upgrade_tests else diff --git a/test/script-support.lisp b/test/script-support.lisp index b36945cb3f602a3284707dc9aafe5a15315dfec4..71b3711d29b0a1a816010ee5cd51920c92a80dd1 100644 --- a/test/script-support.lisp +++ b/test/script-support.lisp @@ -31,9 +31,9 @@ Some constraints: #+(or cmu scl) (c::brevity 2))) (defvar *trace-symbols* - ;; IF YOU WANT TO TRACE SOME STUFF WHILE DEBUGGING, HERE'S A NICE PLACE TO SAY WHAT. - ;; TO BE INTERNED IN :ASDF AFTER IT IS LOADED. - '( :upgrade-asdf :operate :run-program/ + '(;; If you want to trace some stuff while debugging ASDF, + ;; here's a nice place to say what. + ;; These string designators will be interned in ASDF after it is loaded. )) (defvar *debug-asdf* nil) @@ -52,8 +52,8 @@ Some constraints: (unless (fboundp 'ensure-directories-exist) (defun ensure-directories-exist (path) #+genera (fs:create-directories-recursively (pathname path)) - #+gcl (lisp:system (format nil "mkdir -p ~S" (namestring (make-pathname :name nil :type nil :defaults path)))))) - + #+gcl (lisp:system (format nil "mkdir -p ~S" + (namestring (make-pathname :name nil :type nil :defaults path)))))) ;;; Survival utilities (defun asym (name) @@ -334,7 +334,7 @@ is bound, write a message and exit on an error. If `(:source-registry :ignore-inherited-configuration)) (acall :initialize-output-translations `(:output-translations - (,*test-directory* (,*asdf-directory* "build/fasls" :implementation "test")) + ((,*test-directory* :**/ :*.*.*) (,*asdf-directory* "build/fasls" :implementation "test")) (t (,*asdf-directory* "build/fasls" :implementation "root")) :ignore-inherited-configuration)) (set (asym :*central-registry*) `(,*test-directory*)) @@ -358,8 +358,6 @@ is bound, write a message and exit on an error. If (defun common-lisp-user::debug-asdf () (debug-asdf)) -(trace load compile-file) - #| The following form is sometimes useful to insert in compute-action-stamp to find out what's happening. It depends on the DBG macro in contrib/debug.lisp, that you should load in your ASDF. diff --git a/test/test1.script b/test/test1.script index 9b764db73a28e3dec4f8352709f6fae8d3752c1c..63612b1c1a0a55b02e16bd9a94aa20efb899907a 100644 --- a/test/test1.script +++ b/test/test1.script @@ -7,7 +7,7 @@ (touch-file "file2.lisp" :offset -3400) (with-test () - (DBG "loading test1") + (DBG "loading test1" #+clisp asdf/output-translations::*output-translations*) (asdf:load-system 'test1) (let* ((file1 (asdf:compile-file-pathname* "file1")) (file2 (asdf:compile-file-pathname* "file2")) diff --git a/upgrade.lisp b/upgrade.lisp index 63a47ab242308ff88b62b138f09368fc56176f56..e7773b3ae7c3dfdf276dca95ad93f186c86c1232 100644 --- a/upgrade.lisp +++ b/upgrade.lisp @@ -32,7 +32,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.82") + (asdf-version "2.26.83") (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 678da26128484cef24e1a8b191ad5d452437975e..5e6e6d88e8f9a54350815d67b0cb742446cb0058 100644 --- a/utility.lisp +++ b/utility.lisp @@ -230,7 +230,7 @@ starting the separation from the end, e.g. when called with arguments (apply (ensure-function function-spec) arguments)) (defun* call-functions (function-specs) - (map () 'call-hook-function function-specs)) + (map () 'call-function function-specs)) ;;; Version handling