Commit 11a8348e authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Merge branch 'run-program-sbcl-windows'

parents 7bd83836 7462a5ac
......@@ -36,6 +36,7 @@ version := $(shell cat "version.lisp-expr")
#$(info $$version is [${version}])
version := $(patsubst "%",%,$(version))
#$(info $$version is [${version}])
fullversion := $(shell git describe --tags --match "[0-9][.][0-9]*" 2> /dev/null || echo $(version))
## grep for #+/#- features in the test/ directory to see plenty of disabled tests on some platforms
## NOT SUPPORTED BY OUR AUTOMATED TESTS:
......@@ -85,7 +86,7 @@ all_lisp := $(header_lisp) $(driver_lisp) $(defsystem_lisp)
print-% : ; @echo $* = $($*)
# Making ASDF itself should be our first, default, target:
build/asdf.lisp: $(all_lisp)
build/asdf.lisp: show-version $(all_lisp)
mkdir -p build
rm -f $@
cat $(all_lisp) > $@
......@@ -191,6 +192,9 @@ u: test-upgrade
test-clean-load: build/asdf.lisp
./test/run-tests.sh -c ${l}
show-version:
@echo "Building and testing asdf $(fullversion)"
# test-glob has been replaced by t, and lisp by l, easier to type
test-lisp: build/asdf.lisp
@cd test; ./run-tests.sh ${l} ${t}
......@@ -276,7 +280,7 @@ TODO:
release: TODO test-all test-on-other-machines-too debian-changelog debian-package send-mail-to-mailing-lists
.PHONY: install archive push doc website clean mrproper \
.PHONY: install archive push doc website clean mrproper show-version \
test-forward-references test test-lisp test-upgrade test-forward-references \
test-all test-all-lisps test-all-no-upgrade \
debian-package release \
......
......@@ -60,7 +60,7 @@ build/asdf-tools build/asdf-tools.exe: build_asdf_tools
# The text below was automaticaly generated by
# make -f Makefile-lisp-scripting --silent makefile-targets
# then manually inserted here to provide for completion:
.PHONY: archive build-asdf build-asdf-tools bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc ext-clear ext-init ext-reset ext-update extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands t test test-all test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website
.PHONY: archive build-asdf build-asdf-tools bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc ext-clear ext-init ext-reset ext-update extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands show-version t test test-all test-all-basic test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website
archive build-asdf build-asdf-tools bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc ext-clear ext-init ext-reset ext-update extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands t test test-all test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website: force
archive build-asdf build-asdf-tools bump bump-version check-all-results check-all-scripts-results check-all-upgrade-results clean debian-package doc ext-clear ext-init ext-reset ext-update extract extract-all-tagged-asdf extract-tagged-asdf fix-local-git-tags fix-remote-git-tags git-all-committed-p help install install-asdf link-archive load make-and-publish-archive make-archive makefile-targets merge-master-into-release publish-archive publish-debian-package push re show-commands show-version t test test-all test-all-basic test-all-clean-load test-all-no-stop test-all-no-upgrade test-all-no-upgrade-no-stop test-all-scripts test-all-scripts-no-stop test-all-upgrade test-all-upgrade-no-stop test-ascii test-basic test-clean-load test-load-systems test-scripts test-upgrade u wc website: force
${MAKE_SCRIPT} l='$l' L='$L' u='$u' U='$U' v='$v' s='$s' t='$t' $@
......@@ -7,6 +7,7 @@
(:use :uiop/common-lisp :uiop :asdf/upgrade
:asdf/component :asdf/system #:asdf/cache :asdf/find-system :asdf/find-component :asdf/operation)
(:import-from :asdf/operation #:check-operation-constructor)
#-clisp (:unintern #:required-components #:traverse-action #:traverse-sub-actions)
(:export
#:action #:define-convenience-action-methods
#:action-description
......
......@@ -21,7 +21,7 @@
(in-package :asdf/bundle)
(with-upgradability ()
(defclass bundle-op (basic-compile-op)
(defclass bundle-op (operation)
;; NB: use of instance-allocated slots for operations is DEPRECATED
;; and only supported in a temporary fashion for backward compatibility.
;; Supported replacement: Define slots on program-system instead.
......@@ -107,10 +107,10 @@ itself."))
`((,go ,@deps) ,@(call-next-method))))
;; Create a single fasl for the entire library
(defclass basic-compile-bundle-op (bundle-op)
(defclass basic-compile-bundle-op (bundle-op basic-compile-op)
((gather-type :initform #-(or clasp ecl mkcl) :fasl #+(or clasp ecl mkcl) :object
:allocation :class)
(bundle-type :initform :fasl :allocation :class))
(bundle-type :initform :fasb :allocation :class))
(:documentation "Base class for compiling into a bundle"))
;; Analog to prepare-op, for load-bundle-op and compile-bundle-op
......@@ -217,6 +217,8 @@ for all the linkable object files associated with the system or its dependencies
((eql :no-output-file) ;; marker for a bundle-type that has NO output file
(error "No output file, therefore no pathname type"))
((eql :fasl) ;; the type of a fasl
(compile-file-type)) ; on image-based platforms, used as input and output
((eql :fasb) ;; the type of a fasl
#-(or clasp ecl mkcl) (compile-file-type) ; on image-based platforms, used as input and output
#+(or clasp ecl mkcl) "fasb") ; on C-linking platforms, only used as output for system bundles
((member :image)
......@@ -274,7 +276,7 @@ e.g. as part of the implementation, of an outer build system that calls into ASD
or of opaque libraries shipped along the source code."))
(defclass precompiled-system (system)
((build-pathname :initarg :fasl))
((build-pathname :initarg :fasb :initarg :fasl))
(:documentation "Class For a system that is delivered as a precompiled fasl"))
(defclass prebuilt-system (system)
......@@ -341,7 +343,7 @@ or of opaque libraries shipped along the source code."))
(if monolithic 'monolithic-dll-op 'dll-op))
((:lib :static-library)
(if monolithic 'monolithic-lib-op 'lib-op))
((:fasl)
((:fasb)
(if monolithic 'monolithic-compile-bundle-op 'compile-bundle-op))
((:image)
'image-op)
......@@ -511,6 +513,7 @@ which is probably not what you want; you probably need to tweak your output tran
(list
#+clasp (compile-file-pathname (make-pathname :name name :defaults "sys:") :output-type :object)
#+ecl (compile-file-pathname (make-pathname :name name :defaults "sys:") :type :lib)
#+ecl (compile-file-pathname (make-pathname :name (strcat "lib" name) :defaults "sys:") :type :lib)
#+ecl (compile-file-pathname (make-pathname :name name :defaults "sys:") :type :object)
#+mkcl (make-pathname :name name :type (bundle-pathname-type :lib) :defaults #p"sys:")
#+mkcl (make-pathname :name name :type (bundle-pathname-type :lib) :defaults #p"sys:contrib;")))))
......@@ -522,22 +525,30 @@ which is probably not what you want; you probably need to tweak your output tran
:name (coerce-name name)
:static-library (resolve-symlinks* pathname))))
(defun linkable-system (x)
(or (if-let (s (find-system x))
(and (system-source-file x) s))
(if-let (p (system-module-pathname (coerce-name x)))
(make-prebuilt-system x p))))
(defmethod component-depends-on :around ((o image-op) (c system))
(destructuring-bind ((lib-op . deps)) (call-next-method)
(labels ((has-it-p (x) (find x deps :test 'equal :key 'coerce-name))
(ensure-linkable-system (x)
(unless (has-it-p x)
(or (if-let (s (find-system x))
(and (system-source-directory x)
(list s)))
(if-let (p (system-module-pathname x))
(list (make-prebuilt-system x p)))))))
`((,lib-op
(let* ((next (call-next-method))
(deps (make-hash-table :test 'equal))
(linkable (loop* :for (do . dcs) :in next :collect
(cons do
(loop :for dc :in dcs
:for dep = (and dc (resolve-dependency-spec c dc))
:when dep
:do (setf (gethash (coerce-name (component-system dep)) deps) t)
:collect (or (and (typep dep 'system) (linkable-system dep)) dep))))))
`((lib-op
,@(unless (no-uiop c)
(append (ensure-linkable-system "cmp")
(or (ensure-linkable-system "uiop")
(ensure-linkable-system "asdf"))))
,@deps)))))
(list (linkable-system "cmp")
(unless (or (gethash "uiop" deps) (gethash "asdf" deps))
(or (linkable-system "uiop")
(linkable-system "asdf")
"asdf")))))
,@linkable)))
(defmethod perform ((o link-op) (c system))
(let* ((object-files (input-files o c))
......
Subproject commit 926a066611b7b11cb71e26c827a271e500888c30
Subproject commit 85f82ed88d5fa6e63026038dbb1dad0d6cd5dafe
Subproject commit 220b8cab5caeef592690e662e07e694162c4bdaa
Subproject commit 1698221a6ff49126d4f023d1d260f6f8c1cb41bf
Subproject commit 35c5266061d365afc78d9640e9e17c3f891fea91
Subproject commit 0f295337d9dec1733cf0389a5a2827292d6a5b0d
Subproject commit 4bdfd472c06b6e14e55508405bbf3983c74f8414
Subproject commit 7168fc28618e6aab06e6ddfd791dacf7c4527111
Subproject commit 863ec450f9809171462b7c7ec85c778496a0f3ae
Subproject commit c6ef2128a6ac44ba9e9cf0fb34c4ed429b988217
Subproject commit 1d9bda2c1a6c7abce885411f58b2318c37b76bbd
Subproject commit 66e9c6f1499140bc00ccc22febf2aa528cbb5724
Subproject commit 25f0c1c15f38c54272f9f1c81f30797bb7be8d00
Subproject commit e1f6378d75cea9eed243a793efa90cec55e401cb
Subproject commit 0a55ecc11cf564a13f443dd8916d00449b100636
Subproject commit ebf543ca17422dfbb51609f5b6d35a98c5f07449
......@@ -192,8 +192,7 @@ the implementation's REQUIRE rather than by internal ASDF mechanisms."))
(let* ((module (or (required-module s) (coerce-name s)))
(*modules-being-required* (cons module *modules-being-required*)))
(assert (null (component-children s)))
;; CMUCL likes its module names to be all upcase.
(require (nest #+cmucl (string-upcase) module))))
(require module)))
(defmethod resolve-dependency-combination (component (combinator (eql :require)) arguments)
(unless (and (length=n-p arguments 1)
......@@ -210,9 +209,11 @@ the implementation's REQUIRE rather than by internal ASDF mechanisms."))
;; cl:require and asdf:operate that could potentially blow up the stack,
;; all the while defeating the consistency of the dependency graph.
(let* ((module (car arguments)) ;; NB: we already checked that it was not null
(name (string-downcase module))
(system (find-system name nil)))
(or system (let ((system (make-instance 'require-system :name name)))
;; CMUCL, MKCL, SBCL like their module names to be all upcase.
(module-name (string module))
(system-name (string-downcase module))
(system (find-system system-name nil)))
(or system (let ((system (make-instance 'require-system :name system-name :module module-name)))
(register-system system)
system))))
......@@ -222,10 +223,11 @@ the implementation's REQUIRE rather than by internal ASDF mechanisms."))
;; with a name that is traditionally in lowercase. Case is lost along the way. That's fine.
;; We could make complex, non-portable rules to try to preserve case, and just documenting
;; them would be a hell that it would be a disservice to inflict on users.
(let ((module (string-downcase name)))
(unless (member module *modules-being-required* :test 'equal)
(let ((*modules-being-required* (cons module *modules-being-required*))
#+sbcl (sb-impl::*requiring* (remove module sb-impl::*requiring* :test 'equal)))
(let ((module-name (string name))
(system-name (string-downcase name)))
(unless (member module-name *modules-being-required* :test 'equal)
(let ((*modules-being-required* (cons module-name *modules-being-required*))
#+sbcl (sb-impl::*requiring* (remove module-name sb-impl::*requiring* :test 'equal)))
(handler-bind
((style-warning #'muffle-warning)
(missing-component (constantly nil))
......@@ -234,9 +236,9 @@ the implementation's REQUIRE rather than by internal ASDF mechanisms."))
(format *error-output* (compatfmt "~@<ASDF could not load ~(~A~) because ~A.~@:>~%")
name e))))
(let ((*verbose-out* (make-broadcast-stream)))
(let ((system (find-system module nil)))
(let ((system (find-system system-name nil)))
(when system
(require-system system :verbose nil)
(require-system system-name :verbose nil)
t)))))))))
......
......@@ -2,6 +2,8 @@
;;;; Plan
(uiop/package:define-package :asdf/plan
;; asdf/action below is needed for required-components, traverse-action and traverse-sub-actions
;; that used to live there before 3.2.0.
(:recycle :asdf/plan :asdf)
(:use :uiop/common-lisp :uiop :asdf/upgrade
:asdf/component :asdf/operation :asdf/system
......
......@@ -20,7 +20,7 @@
;; make sure mkcl-X.X.X.dll is the same directory as the executable
(let* ((dll-orig (subpathname (si::self-truename)
(strcat #-os-windows "../lib/"
"mkcl_" (lisp-implementation-version)
"mkcl_" (si:mkcl-version)
"." (asdf/bundle:bundle-pathname-type :shared-library))))
(dll-dest (subpathname pathname (strcat #-os-windows "../lib/" (file-namestring dll-orig)))))
(ensure-directories-exist dll-dest)
......
......@@ -181,9 +181,9 @@ do_tests () {
# not used currently but leave here for future reference.
#
case $(uname) in
CYGWIN*) os=windows ;;
Darwin) os=macos ;;
Linux) os=linux ;;
CYGWIN*|MSYS_NT*) os=windows ;;
Darwin*) os=macos ;;
Linux*) os=linux ;;
*) os=unknown ;;
esac
......@@ -223,9 +223,9 @@ case "$lisp" in
# echo ALLEGRO=$ALLEGRO
flags="-q"
nodebug="-batch"
if [ "$os" = windows ] && [ -z "$ALLEGRO_NOISY" ] ; then
if [ "$os" = windows ] ; then
adir=$(dirname "${command}") ;
allegroName=$(basename "${command}") ;
allegroName=$(basename "${command}" ".exe") ;
if [[ ${allegroName: -1} == "8" ]] ; then build=build ; else build=buildi ; fi ;
# this takes somewhat unjustifiable advantage of the fact that
# the Allegro images have the same name (with .dxl extension)
......@@ -357,14 +357,21 @@ upgrade_tags () {
# all the stabilization work done in 3.0 so far, plus extra developments
# in UIOP, package-inferred-system, and more robustification.
# 3.1.2 (2014-05-06) is the first ASDF 3.1 release
# 3.1.3 (2014-07-24) a bug fix release for 3.1.2
# 3.1.4 (2014-10-09) more bug fixes, source-registry cache, in LispWorks 7
# 3.1.5 (2015-07-21) more bug fixes, what SBCL sports (as of 1.3.14, 2017-02-04)
# 3.1.6 (2015-10-17) more bug fixes
# 3.1.7 (2016-03-23) more bug fixes, last in 3.1 series
#
# The 3.2 series provides the asdf3.2 feature, meaning users can rely on
# all its new features (launch-program, improved bundle support), as well as
# the improvements done in 3.1 (e.g. XDG support).
# 3.2.0 (2017-01-08) first (and latest) in 3.2 series
#
# We return the above designated versions in order of decreasing relevance,
# which pretty much means REQUIRE and most recent first.
echo REQUIRE
echo 3.1.7 # 2016-03-23, latest release (as of 2016-09)
echo 3.1.5 # 2015-07-21, what SBCL sports (as of 1.3.9, 2016-08-30)
echo 3.0.3 # 2013-10-22, last in ASDF 3.0 series
echo 2.26 # 2012-10-30, last in ASDF 2 series, still sported by Quicklisp 2016-02-22 (!)
# We picked the last in each relevant series.
echo REQUIRE 3.2.0 3.1.7 3.0.3 2.26
#echo 3.1.7 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2
#echo 3.0.3 3.0.2 3.0.1
......@@ -419,7 +426,7 @@ valid_upgrade_test_p () {
# and only need to test it once, below for 2.24.
abcl:1.*|abcl:2.00[0-9]:*|abcl:201[0-9]:*|abcl:2.2[0-3]:*) : ;;
# ccl fasl numbering broke loading of old asdf 2.0
ccl:2.0[01]*) : ;;
ccl:2.0[01]*|ccl:2.2[0-6]*) : ;;
# Allegro ships with versions 3*, so give up testing 2
# Also, unpatched Allegro 10 has bug updating from 2.26 and before
allegro*:[12].*) : ;;
......
......@@ -173,7 +173,7 @@ Some constraints:
(defun assert-pathname-equal-helper (qx x qy y)
(cond
((equal x y)
(format t "~S and~% ~S both evaluate to same path:~% ~S~%" qx qy x))
(format t "~S and~%~S both evaluate to same path:~% ~S~%" qx qy x))
#+mkcl
((acall :pathname-equal x y)
(format t "~S and ~S evaluate to functionaly equivalent paths, respectively:~% ~S~%and~% ~S~%" qx qy x y))
......
;;; -*- Lisp -*-
(DBG :foo (current-lisp-file-pathname))
(unless (or #+(or allegro (and clisp os-unix) clozure cmucl (and ecl (not ecl-bytecmp)) lispworks mkcl sbcl scl) t)
(unless (or #+(or allegro (and clisp os-unix) clozure cmucl
(and ecl (not ecl-bytecmp)) lispworks mkcl sbcl scl) t)
(DBG "Creating images is not supported on your CL implementation")
(leave-test "Skipping test" 0))
......@@ -43,6 +44,7 @@
(lisp-invocation:invoke-lisp
:implementation-type (lisp-invocation/allegro-variants:current-lisp-variant)
:cross-compile nil
:console t
:load (native-namestring (subpathname *test-directory* "make-hello-world.lisp"))
:eval (format nil "(asdf-test::make-hello-~(~a~))" kind)
:run-program-args
......@@ -70,6 +72,7 @@
:implementation-type (lisp-invocation/allegro-variants:current-lisp-variant)
:cross-compile nil
:image-path (native-namestring img)
:console t
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)"
:run-program-args '(:output :lines :error-output t)))
'("hello, world"))
......@@ -81,6 +84,7 @@
:implementation-type (lisp-invocation/allegro-variants:current-lisp-variant)
:image-path (native-namestring img)
:cross-compile nil
:console t
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)"
:arguments '("a" "b c" "d")
:run-program-args '(:output :lines :error-output t))
......@@ -122,8 +126,9 @@
#+(or ecl mkcl)
(progn
(DBG "Now create an program without UIOP")
(assert (probe-file (asdf/bundle::system-module-pathname "asdf")))
(assert (probe-file (asdf/bundle::system-module-pathname "cmp")))
#+mkcl (assert (probe-file* (asdf/bundle::system-module-pathname "uiop")))
(assert (probe-file* (asdf/bundle::system-module-pathname "asdf")))
#+ecl (assert (probe-file* (asdf/bundle::system-module-pathname "cmp")))
(def-test-system hello-no-uiop
:class program-system
:no-uiop t
......@@ -131,13 +136,48 @@
:epilogue-code
(progn
(format t "~:[Look ma, no UIOP~;Oops, UIOP~]!~%" (find-package :uiop))
(format t "~:[But no TEST-PACKAGE :-(~;But TEST-PACKAGE~]!~%" (find-package :test-package))
(format t "~:[But no TEST-PACKAGE :-(~;And TEST-PACKAGE~]!~%" (find-package :test-package))
(format t "~:[And no ASDF~;But ASDF :-( ~]!~%" (find-package :asdf))
#+ecl (si:quit 0) #+mkcl (mk-ext:quit :exit-code 0)))
(operate 'program-op 'hello-no-uiop :force t)
(DBG :run (output-file 'program-op 'hello-no-uiop))
(assert-equal
(run-program `(,(native-namestring (output-file 'program-op 'hello-no-uiop)))
:output :lines :error-output t)
'("Look ma, no UIOP!" "But TEST-PACKAGE!")))
'("Look ma, no UIOP!" "And TEST-PACKAGE!" "And no ASDF!"))
(DBG "Now create an program with explicit ASDF dependency, without registered ASDF (use implementation-provided prebuilt)")
(assert-pathname-equal
(truename (pathname-directory-pathname (output-file 'lib-op (asdf/bundle::linkable-system "asdf"))))
(truename (subpathname (lisp-implementation-directory) #+mkcl "contrib/" #-mkcl nil)))
(def-test-system hello-asdf
:class program-system
:depends-on ("asdf")
:components ((:file "file1"))
:epilogue-code
(progn
(format t "~:[~Oops, no ASDF~;Look ma, ASDF~]!~%" (find-package :asdf))
(format t "~:[But no TEST-PACKAGE :-( ~;And TEST-PACKAGE~]!~%" (find-package :test-package))
(uiop:quit 0)))
(operate 'program-op 'hello-asdf :force t)
(DBG :run (output-file 'program-op 'hello-asdf))
(assert-equal
(run-program `(,(native-namestring (output-file 'program-op 'hello-asdf)))
:output :lines :error-output t)
'("Look ma, ASDF!" "And TEST-PACKAGE!"))
(DBG "Now create an program with explicit ASDF dependency")
(register-directory *asdf-directory*)
(with-asdf-cache (:override t)
(load-asd (subpathname *asdf-directory* "asdf.asd")) ;; force re-loading ASDF, from source
(assert-pathname-equal
(truename (pathname-directory-pathname (output-file 'lib-op (asdf/bundle::linkable-system "asdf"))))
(truename (resolve-output "asdf/")))
(operate 'program-op 'hello-asdf :force t)
(DBG :run (output-file 'program-op 'hello-asdf))
(assert-equal
(run-program `(,(native-namestring (output-file 'program-op 'hello-asdf)))
:output :lines :error-output t)
'("Look ma, ASDF!" "And TEST-PACKAGE!"))))
;;; TODO: include a regular system dependency and a prebuilt-system in the executable.
......@@ -269,6 +269,7 @@
;; types
asdf/bundle:user-system
#+sbcl uiop/lisp-build:sb-grovel-unknown-constant-condition
uiop/image:fatal-condition
;; on some implementations only
asdf/bundle:bundle-system
asdf/bundle:static-library
......@@ -300,12 +301,12 @@
:collect symbol))
(defun fishy-asdf-exported-symbols ()
(remove-duplicates
(loop :for package :in (list-all-packages)
:when (and (string-prefix-p "ASDF/" (package-name package))
(not (equal (package-name package) "ASDF/COMMON-LISP")))
:nconc (fishy-exported-symbols package))
:from-end t))
(loop :for package :in (list-all-packages)
:when (and (or (string-prefix-p "ASDF/" (package-name package))
(string-prefix-p "UIOP/" (package-name package)))
(not (equal (package-name package) "UIOP/COMMON-LISP")))
:append (let ((fishy (fishy-exported-symbols package)))
(when fishy (list (cons (package-name package) (mapcar 'symbol-name fishy)))))))
(assert-equal nil (fishy-asdf-exported-symbols))
......
(defsystem "asdf-tools"
:description "tools to build, test, maintain and release ASDF itself"
:depends-on ((:version "asdf" "3.1.6")
:depends-on ((:version "asdf" "3.2.0")
(:version "inferior-shell" "2.0.3.4")
(:version "lisp-invocation/all" "1.0.12")
(:version "lisp-invocation/all" "1.0.14")
(:version "cl-ppcre" "2.0.11")
(:version "optima.ppcre" "1.0")
(:version "cl-scripting" "0.2")
......@@ -21,6 +21,6 @@
(:file "test-basic" :depends-on ("test-environment"))
(:file "test-scripts" :depends-on ("test-environment"))
(:file "test-upgrade" :depends-on ("test-environment" "git"))
(:file "test-all" :depends-on ("test-environment"))
(:file "test-all" :depends-on ("test-basic"))
(:file "installation" :depends-on ("test-environment"))
(:file "release" :depends-on ("version" "test-environment" "git"))))
......@@ -7,8 +7,7 @@
(deftestcmd build-asdf-tools ()
"build a binary for asdf-tools"
(when (asdf:traverse :program-op :asdf-tools)
(asdf:operate :program-op :asdf-tools))
(asdf:operate :program-op :asdf-tools)
(success))
;;; Documentation
......
......@@ -48,10 +48,10 @@ The UNIX-y name will be downcased, and any % prefix will be dropped."
ext-init ext-clear ext-reset ext-update ;; extension
git-all-committed-p
bump-version bump ;; version
test-load-systems test-clean-load test-basic test-ascii %load install-asdf ;; test-basic
test-load-systems test-clean-load test-basic test-ascii %load install-asdf show-version ;; test-basic
test %t test-scripts ;; test-scripts
test-upgrade u extract-tagged-asdf extract-all-tagged-asdf extract ;; test-upgrade
test-all-clean-load test-all-scripts test-all-no-upgrade test-all-upgrade ;; test-all
test-all-basic test-all-clean-load test-all-scripts test-all-no-upgrade test-all-upgrade ;; test-all
test-all test-all-scripts-no-stop test-all-upgrade-no-stop
test-all-no-upgrade-no-stop test-all-no-stop
check-all-scripts-results check-all-upgrade-results check-all-results
......
......@@ -13,6 +13,19 @@
(defmacro with-all-lisps ((lisp-var lisps &key muffle-failures) &body body)
`(call-with-all-lisps (lambda (,lisp-var) ,@body) :lisps ,lisps :muffle-failures ,muffle-failures))
(deftestcmd test-all-basic (lisps systems)
"basic test: doc, clean-load, load-systems"
(without-stopping ()
(show-version)
(doc)
(test-ascii)
(test-all-clean-load lisps)
(test-all-load-systems lisps systems)))
(deftestcmd test-all-load-systems (lisps systems)
(with-systems-test (systems)
(with-all-lisps (l lisps) (test-load-systems l systems))))
(deftestcmd test-all-clean-load (lisps)
"test-clean-load on all lisps"
(with-all-lisps (l lisps) (test-clean-load l)))
......@@ -22,8 +35,8 @@
(with-all-lisps (l lisps) (test-scripts l)))
(deftestcmd test-all-no-upgrade ()
"test-basic, and test-all-script"
(test-basic) (test-all-scripts))
"test-all-basic, and test-all-script"
(test-all-basic) (test-all-scripts))
(deftestcmd test-all-upgrade (upgrade-lisps)
"test-upgrade on all lisps"
......@@ -44,16 +57,14 @@
(deftestcmd test-all-no-upgrade-no-stop ()
"all tests but upgrade on all lisps, no stop"
(without-stopping ()
(doc) (test-load-systems)
(test-all-clean-load)
(test-all-basic)
(test-all-scripts-no-stop)
(check-all-scripts-results)))
(deftestcmd test-all-no-stop () ;; TODO: pass arguments!
"all tests on all lisps, no stop"
(without-stopping ()
(doc) (test-load-systems)
(test-all-clean-load)
(test-all-basic)
(test-all-scripts-no-stop)
(test-all-upgrade-no-stop)
(check-all-results)))
......
......@@ -12,17 +12,30 @@ compilation errors and to interactively debug ASDF."
',(system-source-files :asdf/defsystem :monolithic t)))
:lisp lisp :debugger t :output :interactive)))
(defmacro with-systems-test ((systems) &body body)
`(call-with-systems-test ,systems (lambda () ,@body)))
(defun call-with-systems-test (systems thunk)
(if systems
(funcall thunk)
(format t "Skipping system loading test.
To enable the system loading test,
export ASDF_TEST_SYSTEMS=\"some systems\"
or pass s=\"some systems\" to your make command
and this test with make sure those systems can be loaded.~%")))
(deftestcmd test-load-systems (lisp systems)
"test loading of your favorite systems
Use your preferred Lisp implementation"
(with-asdf-dir ()
(let* ((log (newlogfile "systems" lisp)))
(log! log "Loading all these systems on ~(~A~):~{~% ~A~}~%~%" lisp systems)
(run-test-lisp
"loading the systems"
`((load "test/script-support.lisp")
(asdf-test::with-test () (asdf-test::test-load-systems ,@systems)))
:lisp lisp :log log))))
(with-systems-test (systems)
(with-asdf-dir ()
(let* ((log (newlogfile "systems" lisp)))
(log! log "Loading all these systems on ~(~A~):~{~% ~A~}~%~%" lisp systems)
(run-test-lisp
"loading the systems"
`((load "test/script-support.lisp")
(asdf-test::with-test () (asdf-test::test-load-systems ,@systems)))
:lisp lisp :log log)))))
(deftestcmd test-clean-load (lisp log)
"test that asdf load cleanly
......@@ -57,6 +70,7 @@ Use your preferred lisp implementation and check that asdf is loaded without any
(deftestcmd test-basic (lisp systems)
"basic test: doc, clean-load, load-systems"
(without-stopping ()
(show-version)
(doc)
(test-ascii)
(test-clean-load lisp)
......@@ -67,3 +81,7 @@ Use your preferred lisp implementation and check that asdf is loaded without any
(success-if
(loop for c across (read-file-string (pn "build/asdf.lisp"))
always (<= 0 (char-code c) 127))))
(deftestcmd show-version ()
(format t "Building and testing asdf ~A~%" (version-from-tag)))
......@@ -136,7 +136,7 @@ and which systems to test loading with ASDF_TEST_SYSTEMS or s=
(upgrade-methods ((upgrade-methods *upgrade-test-methods*))
(setf upgrade-methods (get-upgrade-methods upgrade-methods)))
(new-version (new-version)
(setf new-version (or new-version (next-version (version-from-file))))))
(setf new-version (or new-version (compute-next-version (version-from-file))))))
:for arg :in args
:for (found larg init) = (assoc arg argmap)
:append (if found larg (list arg)) :into largs
......@@ -157,7 +157,7 @@ and which systems to test loading with ASDF_TEST_SYSTEMS or s=
(apply ',real args)))
(deftestcmd interactive-command (lisp)
(let* ((command (lisp-invocation-arglist :implementation-type lisp :debugger t)))
(let* ((command (lisp-invocation-arglist :implementation-type lisp :debugger t :console t)))
(return-from interactive-command (cons "rlwrap" command))))
(defparameter *default-test-lisps*
......@@ -222,7 +222,7 @@ and which systems to test loading with ASDF_TEST_SYSTEMS or s=
(format t "~&Now ~A...~@[ (log in ~A)~]~%" activity log)
(let* ((eval (compose-non-special-string forms)) ;; at least avoiding ~% is necessary on Windows.
(command (lisp-invocation-arglist :implementation-type (get-lisp lisp)
:eval eval :debugger debugger))
:eval eval :debugger debugger :console t))
(interactive (if (eq output :interactive) :interactive nil))
(output (if (eq output t) *standard-output* output))
(output (if (eq output *stdout*) :interactive output)))
......
......@@ -85,6 +85,6 @@ Ran ~D tests, ~D passed, ~D failed~
(deftestcmd test (lisp test-scripts)
"run all normal tests but upgrade tests
Use the preferred lisp implementation"
(without-stopping () (doc) (test-clean-load lisp) (test-scripts lisp test-scripts)))
(without-stopping () (test-basic lisp) (test-scripts lisp test-scripts)))
(defalias %t test)
......@@ -5,19 +5,23 @@
(defparameter *default-upgrade-test-tags*
;; We return a list of entries in reverse chronological order,
;; which should also be more or less the order of decreasing relevance.
;; By default, we only test the last of each relevant series.
'("REQUIRE" "3.2.0" "3.1.7" "3.0.3" "2.26"))
(defparameter *all-upgrade-test-tags*
'("REQUIRE" ;; a magic tag meaning whatever your implementation provides, if anything
"3.1.7" ;; (2016-03-23) more bug fixes, latest release (as of 2016-09-17)
"3.1.5" ;; (2015-07-21) more bug fixes
"3.0.3" ;; (2013-10-22) the last in the ASDF 3.0 series
"2.26")) ;; (2012-10-30), last in ASDF 2 series, still sported by Quicklisp 2016-02-22 (!)
(defparameter *obsolete-upgrade-test-tags*
'(;; The 3.1 series provides the asdf3.1 feature, meaning users can rely on
;; The 3.2 series provides the asdf3.2 feature, meaning users can rely on
;; all its new features (launch-program, improved bundle support), as well as
;; the improvements done in 3.1 (e.g. XDG support).
"3.2.0" ;; (2017-01-08) first (and latest) in 3.2 series
;; The 3.1 series provides the asdf3.1 feature, meaning users can rely on
;; all the stabilization work done in 3.0 so far, plus extra developments
;; in UIOP, package-inferred-system, and more robustification.
;;(included above) "3.1.7" ;; (2016-03-23) more bug fixes, latest release (as of 2016-09-17)
"3.1.7" ;; (2016-03-23) more bug fixes, last in 3.1 series
"3.1.6" ;; (2015-10-17) more bug fixes
;;(included above) "3.1.5" ;; (2015-07-21) more bug fixes, what SBCL sports (as of 1.3.9, 2016-08-30)
"3.1.5" ;; (2015-07-21) more bug fixes, what SBCL sports (as of 1.3.14, 2017-02-04)
"3.1.4" ;; (2014-10-09) more bug fixes, source-registry cache, in LispWorks 7
"3.1.3" ;; (2014-07-24) a bug fix release for 3.1.2
"3.1.2" ;; (2014-05-06) the first ASDF 3.1 release
......@@ -26,7 +30,7 @@
;; with Robert Goldman taking over maintainership at 3.0.2.
;; 3.0.0 was just 2.33.10 promoted, but version-satisfies meant it was suddenly
;; not compatible with ASDF2 anymore, so we immediately released 3.0.1
;;(included above) "3.0.3" ;; (2013-10-22) the last in the ASDF 3.0 series
"3.0.3" ;; (2013-10-22) last in the ASDF 3.0 series
"3.0.2" ;; (2013-07-02) the first ASDF 3 in SBCL
"3.0.1" ;; (2013-05-16) the first stable ASDF 3 release
......@@ -37,7 +41,7 @@
;; The ASDF 2 series
;; Note that 2.26.x is where the refactoring that begat ASDF 3 took place.
;; 2.26.61 is the last single-file, single-package ASDF.
;;(included above) "2.26" ;; (2012-10-30), last in ASDF 2 series, still sported by Quicklisp 2016-02-22 (!), long used by SBCL, etc.
"2.26" ;; (2012-10-30), last in ASDF 2 series, still sported by Quicklisp 2016-02-22 (!), long used by SBCL, etc.
"2.22" ;; (2012-06-12) used by debian wheezy, etc.
"2.20" ;; (2012-01-18) in CCL 1.8, Ubuntu 12.04 LTS
"2.019" ;; (2011-11-29) still included in LispWorks in 2014.
......@@ -59,9 +63,10 @@
((string-equal x :default)
*default-upgrade-test-tags*)
((string-equal x :old)
*obsolete-upgrade-test-tags*)
(remove-if (lambda (x) (member x *default-upgrade-test-tags* :test 'equal))
*all-upgrade-test-tags*))
((string-equal x :all)
(append *default-upgrade-test-tags* *obsolete-upgrade-test-tags*))
*all-upgrade-test-tags*)
(t (ensure-list-of-strings (string x)))))))
(defun extract-tagged-asdf (tag)
......@@ -107,12 +112,21 @@ Use at a given tag, put it under build/asdf-${tag}.lisp"
(or
(string-equal tag "REQUIRE") ;; we are hopefully always able to upgrade from REQUIRE
(ecase lisp
;; ABCL makes it damn slow. Also, for some reason, we punt on anything earlier than 2.25,
;; and only need to test it once, below for 2.24.
((:abcl) (version<= "2.24" tag))
;; ABCL works but is super-slow. Since we now punt on all of 2.x,
;; no need to check anything below 2.26.
((:abcl) (version<= "2.26" tag))
;; CCL fasl numbering broke loading of old asdf 2.0
((:ccl) (or (version< tag "2.0") (version<= "2.20" tag)))
;; Allegro ships with versions 3*, so give up testing 2
;; Also, unpatched Allegro 10 has bug updating from 2.26 and before
((:allegro :allegromodern :allegro8 :allegromodern8
:allegro_64 :allegromodern_64 :allegro8_64 :allegromodern8_64
:allegro_s :allegromodern_s :allegro8_s :allegromodern8_s
:allegro_64_s :allegromodern_64_s :allegro8_64_s :allegromodern8_64_s)
(version<= "2.27" tag))
;; CCL fasl numbering broke loading of old asdf 2.0, and the punting for 2.26 fails,
;; but who cares since CCL has always been shipping recent versions of ASDF.
((:ccl) (version<= "2.27" tag))
;; CLASP is only supported as of 3.1.4.3
((:clasp) (version<= "3.1.4.3" tag))
......@@ -144,18 +158,14 @@ Use at a given tag, put it under build/asdf-${tag}.lisp"
;; MKCL is only supported starting with specific versions 2.24, 2.26.x, 3.0.3.0.x, so skip.
((:mkcl) (version<= "3.1.2" tag))
;; all clear on these implementations
((:sbcl :scl) t)
;; XCL support starts with ASDF 2.014.2
;; — It also dies during upgrade trying to show the backtrace.
;; We recommend you replace XCL's asdf using:
;; ./tools/asdf-tools install-asdf xcl
((:xcl) (version<= "2.15" tag))
;; all clear on these implementations
((:allegro :allegromodern :allegro8 :allegromodern8
:allegro_64 :allegromodern_64 :allegro8_64 :allegromodern8_64
:allegro_s :allegromodern_s :allegro8_s :allegromodern8_s
:allegro_64_s :allegromodern_64_s :allegro8_64_s :allegromodern8_64_s