Commit 6160b217 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Found the bugs triggered by using load-fasl-op on ECL.

But one bug remains with test-xach-update-bug.script,
so leaving it commented out until I get feedback from the ECL team.
parent 28d3f90a
......@@ -244,7 +244,7 @@ itself.")) ;; operation on a system and its dependencies
(loop :for f :in (funcall key sub-o sub-c)
:when (funcall test f) :do (collect f))))))
(defmethod input-files ((o bundle-op) (c system))
(defmethod input-files ((o gather-op) (c system))
(unless (eq (bundle-type o) :no-output-file)
(direct-dependency-files o c :test 'bundlable-file-p :key 'output-files)))
......@@ -454,8 +454,9 @@ itself.")) ;; operation on a system and its dependencies
#+ecl
(with-upgradability ()
;; I think that Juanjo intended for this to be,
;; but it breaks 4 tests in what looks like to be a compiler bug, so I'll punt for now.
;; I think that Juanjo intended for this to be.
;; But it might break systems with missing dependencies,
;; and there is a weird bug in test-xach-update-bug.script
;;(unless (use-ecl-byte-compiler-p)
;; (setf *load-system-operation* 'load-fasl-op))
......
......@@ -7,13 +7,15 @@
((:file "file1"
:perform (load-op :before (o c)
(incf *a*)
(format t "Method run before ~A~%" (action-description o c))))
(format t "Method run before ~A - *a* = ~S~%~%" (action-description o c) *a*)))
(:file "file2" :depends-on ("file1")
:perform (load-op (o c)
(incf *a*)
(format t "Method run for ~A~%" (action-description o c))
(format t "Method run for ~A - *a* = ~S~%" (action-description o c) *a*)
(call-next-method)))))
(load-system :foo)
;;; Note: not calling load-system, because on ECL that would be a load-fasl-op,
;;; and at most the file load-op happen, whereas the second .o is linked and never loaded.
(operate 'load-op :foo)
(assert-equal *a* 2)
......@@ -5,7 +5,7 @@
:source-file nil
:components
((:file "file1")
(:file "file2" :pathname "level2/file2")
(:file "file2" :pathname "level2/file2" :depends-on ("file1"))
(:static-file "level2/static.file")
(:static-file "test-tmp.cl")))
......
......@@ -40,6 +40,11 @@
(subpathname *test-directory* "xach-foo-2/b.lisp")
(component-pathname (find-component foo2 "b")))
(DBG "load foo yet again. It should see the pathname has changed and load it anew")
(load-system foo)
;;; ECL bug: this fails if we use load-fasl-op instead of load-op:
;;; the test-asdf-location-change.fasb is linked and loaded,
;;; but that fails to create the :second-version package;
;;; loading the same .fasb in another ecl works fine, and defined (second-version:wtf). WTF?
;;; Test it by replacing load-op below by load-fasl-op, and trace load* and other functions.
(operate 'load-op foo)
(assert (symbol-value (find-symbol* :loaded :second-version)))
(assert-equal 42 (symbol-call :second-version :wtf))
;;; -*- Lisp -*-
;; We don't use load-system, because it can be load-fasl-op on ECL,
;; and these systems define manual dependencies on compile-op.
(DBG "test2: loading test2b1")
(asdf:load-system 'test2b1)
(operate 'load-op 'test2b1)
(DBG "test2: file3 and file4 were compiled")
(assert (and (probe-file (test-fasl "file3.lisp"))
......@@ -12,7 +13,7 @@
(DBG "test2: loading test2b2 should fail")
(handler-case
(asdf:load-system 'test2b2)
(operate 'load-op 'test2b2)
(asdf:missing-dependency (c)
(format t "load failed as expected: - ~%~A~%" c))
(:no-error (c)
......@@ -22,7 +23,7 @@
(DBG "test2: loading test2b3 should fail")
(handler-case
(asdf:load-system 'test2b3)
(operate 'load-op 'test2b3)
(asdf:missing-dependency (c)
(format t "load failed as expected: - ~%~A~%" c))
(:no-error (c)
......
......@@ -7,6 +7,3 @@
(in-package :second-version)
(defparameter loaded t)
......@@ -3,4 +3,4 @@
(asdf:defsystem #:test-asdf-location-change
:serial t
:components ((:file "a")
(:file "b")))
(:file "b" :depends-on ("a"))))
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