Commit c45e1c46 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

2.26.169: yet another logical-pathname tweak, for ABCL this time.

Also, tweak asdf.asd for more robust upgrade
from ASDF earlier than 2.017, and
fix script-support for upgrade from 2.019 and later.

Make some test scripts more robust wrt pathname madness.

Update TODO.
parent decc2a2c
* Resolve performance degradation issue reported by stassats and fe[nl]ix
** Is it the warnings feature taking too much resources?
** Is output-files and/or input-files being called too much? Cache it!
* fix upgrade on clisp
** Extract minimal test case
* Bug found by fe[nl]ix: infinite loop if the definitions in an asd file
are not in strict defsystem-depends-on dependency order. Document the issue.
* fe[nl]ix: Defer evaluation of defsystem forms?
are not in strict defsystem-depends-on dependency order.
** At least document the issue.
** Real solution: defer parsing and evaluation of defsystem forms.
* Learn to use cl-grid-test, to make sure ASDF changes don't break stuff,
and that breakage gets fixed quickly.
* Test stassats's thing:
(asdf:enable-asdf-binary-locations-compatibility :centralize-lisp-binaries t :default-toplevel-directory *fasl-dir*)
* Include some ABL test for stassats's thing:
(asdf:enable-asdf-binary-locations-compatibility
:centralize-lisp-binaries t :default-toplevel-directory *fasl-dir*)
* Make load-op a generic operation that selects the proper strategy
for each system, module or file, according to component properties and user-configuration:
compile the lisp file then load the fasl (load-compiled-op),
compile the lisp file then load the fasl (load-fasl-op on a cl-source-file),
load the lisp file without compiling (load-source-op),
compile all files for the system, link them and load the result (load-fasl-op),
compile all files for the system, link them and load the result
(load-fasl-op on the system),
compile all files for the system *and* its dependencies, link and load (monolithic-load-fasl-op),
concatenate all files for the system, then load the result (load-concatenated-source-op),
concatenate all files for the system, then link them and load the result (load-compiled-concatenated-op),
......
......@@ -66,7 +66,7 @@
:licence "MIT"
:description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "2.26.168" ;; to be automatically updated by make bump-version
:version "2.26.169" ;; 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.
......@@ -78,5 +78,13 @@
:components
(#-gcl2.6
(:file "asdf"
#-asdf3 :do-first #+asdf3 :in-order-to ((compile-op (load-source-op "asdf")))))))
#+asdf3 :in-order-to #+asdf3 ((compile-op (load-source-op "asdf")))))))
:in-order-to (#+asdf3 (prepare-source-op (monolithic-concatenate-source-op :asdf/defsystem))))
;; Using :do-first instead of :in-order-to works above from ASDF 2.017 to 2.26,
;; but only this (or an equivalent defmethod component-do-first) works for ASDF1
#-asdf3
(setf (slot-value
(find-component (find-component (find-system "asdf") "build") "asdf")
'asdf::do-first)
'((compile-op (load-source-op "asdf"))))
......@@ -72,7 +72,7 @@ a CL pathname satisfying all the specified constraints as per ENSURE-PATHNAME"
;; and we can survive and we will continue the planning
;; as if the file were very old.
;; (or should we treat the case in a different, special way?)
(handler-case (file-write-date pathname) (file-error () nil)))
(handler-case (file-write-date (translate-logical-pathname pathname)) (file-error () nil)))
(defun* probe-file* (p &key truename)
"when given a pathname P (designated by a string as per PARSE-NAMESTRING),
......
;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
;;; This is ASDF 2.26.168: Another System Definition Facility.
;;; This is ASDF 2.26.169: Another System Definition Facility.
;;;
;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>.
......
......@@ -244,7 +244,7 @@ upgrade_tags () {
# 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
# 2.26.61 is the last single-package ASDF.
# 2.26.61 is the last single-file, single-package ASDF.
echo REQUIRE 1.85 1.97 1.369
git tag -l '2.0??'
git tag -l '2.??'
......@@ -387,4 +387,4 @@ elif [ -n "$upgrade" ] ; then
run_upgrade_tests
else
run_tests "$@"
fi
fi ; exit # NB: "; exit" makes it robust wrt the script being modified while running.
......@@ -15,7 +15,7 @@ Some constraints:
(:export
#:asym #:acall #:asymval
#:*test-directory* #:*asdf-directory* #:*build-directory* #:*implementation*
#:assert-compare #:assert-pathname-equal #:assert-pathnames-equal
#:assert-compare #:assert-equal #:assert-pathname-equal #:assert-pathnames-equal
#:hash-table->alist
#:load-asdf #:maybe-compile-asdf
#:load-asdf-lisp #:compile-asdf #:load-asdf-fasl
......@@ -468,7 +468,7 @@ is bound, write a message and exit on an error. If
(when (asym :initialize-output-translations)
(acall :initialize-output-translations
`(:output-translations
((,(namestring *asdf-directory*)) ,(output-location "asdf"))
(,(namestring *asdf-directory*) ,(output-location "asdf"))
(t ,(output-location "root"))
:ignore-inherited-configuration)))
(when (asym :*central-registry*)
......@@ -476,7 +476,8 @@ is bound, write a message and exit on an error. If
(format t "Being a bit verbose~%")
(when (asym :*asdf-verbose*) (setf (asymval :*asdf-verbose*) t))
(when (asym :*verbose-out*) (setf (asymval :*verbose-out*) *standard-output*))
(when (and (asym :locate-system) (asym :pathname-directory-pathname))
(when (and (asym :locate-system) (asym :pathname-directory-pathname)
(asym :pathname-equal))
(format t "Comparing directories~%")
(let ((x (acall :pathname-directory-pathname (nth-value 2 (acall :locate-system :test-asdf)))))
(assert-pathname-equal *test-directory* x) ;; not always EQUAL (!)
......
;;; -*- Lisp -*-
#+gcl2.6 (leave-test "GCL 2.6 doesn't do Logical pathnames" 0)
#-gcl2.6
(setf (logical-pathname-translations "ASDF")
#+(or allegro clisp)
`(("**;*.*.*" ,(asdf::wilden *asdf-directory*)))
......@@ -13,44 +12,43 @@
`(,*asdf-directory* "build/fasls" :implementation "logical-host-asdf")
:wilden t))))
#-gcl2.6
(setf asdf/cache:*asdf-cache* nil)
(DBG :logical
(logical-pathname-translations "ASDF")
(translate-logical-pathname "ASDF:test;test-force.asd")
(truename "ASDF:test;test-force.asd"))
#-(or xcl gcl2.6)
(progn
(DBG "Test logical pathnames in central registry")
(setf *central-registry* '(#p"ASDF:test;"))
(initialize-source-registry '(:source-registry :ignore-inherited-configuration))
(DBG "loading" (oos 'load-op :test-logical-pathname :force t)))
#-(or xcl gcl2.6)
(progn
(DBG "Test logical pathnames in source-registry, non-recursive")
(clear-system :test-logical-pathname)
(setf *central-registry* '())
(initialize-source-registry
'(:source-registry (:directory #p"ASDF:test;") :ignore-inherited-configuration))
(load-system :test-logical-pathname :force t :verbose t))
#-(or xcl gcl2.6)
(progn
(DBG "Test logical pathnames in source-registry, recursive")
(clear-system :test-logical-pathname)
(setf *central-registry* '())
(initialize-source-registry
;; Bug: Allegro Express 8.2 and 9.0 incorrectly read #p"ASDF:" as relative.
;; other bug: around 2.26.xx, CLISP borks badly if this is ASDF:
;; and it tries to load ASDF from a logical-pathname.
'(:source-registry (:tree #p"ASDF:test;")
:ignore-inherited-configuration))
(load-system :test-logical-pathname :force t)
#-(or clisp abcl)
(let ((sys (find-system :test-logical-pathname)))
(assert (logical-pathname-p (component-pathname sys)))
(assert (logical-pathname-p (system-source-file sys)))))
#+xcl (leave-test "GCL 2.6 doesn't do Logical pathnames well enough" 0)
(DBG "Test logical pathnames in central registry")
(setf *central-registry* '(#p"ASDF:test;"))
(initialize-source-registry '(:source-registry :ignore-inherited-configuration))
(DBG "loading" (oos 'load-op :test-logical-pathname :force t))
(DBG "Test logical pathnames in source-registry, non-recursive")
(clear-system :test-logical-pathname)
(setf *central-registry* '())
(initialize-source-registry
'(:source-registry (:directory #p"ASDF:test;") :ignore-inherited-configuration))
(load-system :test-logical-pathname :force t :verbose t)
(DBG "Test logical pathnames in source-registry, recursive")
(clear-system :test-logical-pathname)
(setf *central-registry* '())
(initialize-source-registry
;; Bug: Allegro Express 8.2 and 9.0 incorrectly read #p"ASDF:" as relative.
;; other bug: around 2.26.xx (before the nil-pathname cleanup, though),
;; CLISP borks badly if the path below is #p"ASDF:"
;; and it tries to load ASDF itself from a logical-pathname.
'(:source-registry (:tree #p"ASDF:test;")
:ignore-inherited-configuration))
(load-system :test-logical-pathname :force t)
#+(or clisp abcl) (leave-test "CLISP and ABCL translate logical pathnames in *LOAD-PATHNAME*" 0)
(defparameter sys (find-system :test-logical-pathname))
(assert (logical-pathname-p (component-pathname sys)))
(assert (logical-pathname-p (system-source-file sys)))
(DBG "Done")
......@@ -4,8 +4,6 @@ make sure that serial t and static-files
don't cause full rebuilds all the time...
|#
(in-package :asdf-test)
(defparameter s
......@@ -19,24 +17,31 @@ don't cause full rebuilds all the time...
(eval s)
(load-test-system 'static-and-serial)
(defparameter file1 (test-fasl "file1.lisp"))
(defparameter file1-date (file-write-date file1))
(defparameter file1.lisp (component-pathname (find-component 'static-and-serial "file1")))
(defparameter file2.lisp (component-pathname (find-component 'static-and-serial "file2.lisp")))
(defparameter run-tests.sh (component-pathname (find-component 'static-and-serial "run-tests.sh")))
(defparameter file1.fasl (first (output-files 'compile-op '(static-and-serial "file1"))))
(assert-equal file1.lisp (test-source "file1.lisp"))
(assert-equal file2.lisp (test-source "file2.lisp"))
(assert-equal run-tests.sh (test-source "run-tests.sh"))
(assert-pathname-equal file1.fasl (test-fasl "file1")) ;; differ on CCL. Sigh.
(defparameter file1-date (get-file-stamp file1.fasl))
(defparameter date1 (- file1-date 600))
(defparameter date2 (- file1-date 300))
(defparameter date3 (- file1-date 150))
(assert file1-date)
(assert (asymval :*file1* :test-package))
(format t "file: ~S~%date: ~S~%" file1 file1-date)
(format t "file: ~S~%date: ~S~%" file1.fasl file1-date)
;; date should stay same
(clear-system 'static-and-serial)
(delete-package :test-package)
(eval s)
(touch-file "file2.lisp" :timestamp date1)
(touch-file "run-tests.sh" :timestamp date1)
(touch-file "file1.lisp" :timestamp date2)
(touch-file file1 :timestamp date3)
(touch-file file2.lisp :timestamp date1)
(touch-file run-tests.sh :timestamp date1)
(touch-file file1.lisp :timestamp date2)
(touch-file file1.fasl :timestamp date3)
(DBG "load again" (oos 'load-op 'static-and-serial))
(assert (asymval :*file1* :test-package))
(assert-equal (get-file-stamp file1) date3)
(assert-equal (get-file-stamp file1.fasl) date3)
......@@ -51,7 +51,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.168")
(asdf-version "2.26.169")
(existing-version (asdf-version)))
(setf *asdf-version* asdf-version)
(when (and existing-version (not (equal asdf-version existing-version)))
......
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