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

Move with-muffled-loader-conditions inside load*, to match compile-file*.

Improve :DBG docstring. Tweak TODO.
parent 3854b2ae
* Decree that versions older than 2 years are not supported,
remove them from upgrade tests.
remove them from upgrade tests. We should already not support
anything older than 2.014.5 from Quicklisp, or so.
Yet, we should keep supporting upgrading from what vendors provide.
* Improve upgrade so that we don't lose state when upgrading from a "recent enough" ASDF.
This requires better upgrade tests, with hot data.
......
......@@ -301,8 +301,7 @@ Going forward, we recommend new users should be using the source-registry.
:condition condition))))
(asdf-message (compatfmt "~&~@<; ~@;Loading system definition~@[ for ~A~] from ~A~@:>~%")
name pathname)
(with-muffled-loader-conditions ()
(load* pathname :external-format external-format)))))))
(load* pathname :external-format external-format))))))
(defvar *old-asdf-systems* (make-hash-table :test 'equal))
......
......@@ -189,7 +189,7 @@
(perform (find-operation o 'compile-op) c)))))
(defun perform-lisp-load-fasl (o c)
(if-let (fasl (first (input-files o c)))
(with-muffled-loader-conditions () (load* fasl))))
(load* fasl)))
(defmethod perform ((o load-op) (c cl-source-file))
(perform-lisp-load-fasl o c))
(defmethod perform ((o load-op) (c static-file))
......@@ -225,9 +225,8 @@
(defun perform-lisp-load-source (o c)
(call-with-around-compile-hook
c #'(lambda ()
(with-muffled-loader-conditions ()
(load* (first (input-files o c))
:external-format (component-external-format c))))))
(load* (first (input-files o c))
:external-format (component-external-format c)))))
(defmethod perform ((o load-source-op) (c cl-source-file))
(perform-lisp-load-source o c))
......
......@@ -699,19 +699,20 @@ it will filter them appropriately."
(defun load* (x &rest keys &key &allow-other-keys)
"Portable wrapper around LOAD that properly handles loading from a stream."
(etypecase x
((or pathname string #-(or allegro clozure genera) stream)
(apply 'load x keys))
;; Genera can't load from a string-input-stream
;; ClozureCL 1.6 can only load from file input stream
;; Allegro 5, I don't remember but it must have been broken when I tested.
#+(or allegro clozure genera)
(stream ;; make do this way
(let ((*package* *package*)
(*readtable* *readtable*)
(*load-pathname* nil)
(*load-truename* nil))
(eval-input x)))))
(with-muffled-loader-conditions ()
(etypecase x
((or pathname string #-(or allegro clozure genera) stream #+clozure file-stream)
(apply 'load x keys))
;; Genera can't load from a string-input-stream
;; ClozureCL 1.6 can only load from file input stream
;; Allegro 5, I don't remember but it must have been broken when I tested.
#+(or allegro clozure genera)
(stream ;; make do this way
(let ((*package* *package*)
(*readtable* *readtable*)
(*load-pathname* nil)
(*load-truename* nil))
(eval-input x))))))
(defun load-from-string (string)
"Portably read and evaluate forms from a STRING."
......
......@@ -13,8 +13,8 @@
(:export
;; magic helper to define debugging functions:
#:uiop-debug #:load-uiop-debug-utility #:*uiop-debug-utility*
;; (un)defining functions
#:undefine-function #:undefine-functions #:defun* #:defgeneric* #:with-upgradability
#:with-upgradability ;; (un)defining functions in an upgrade-friendly way
#:undefine-function #:undefine-functions #:defun* #:defgeneric*
#:nest #:if-let ;; basic flow control
#:while-collecting #:appendf #:length=n-p #:ensure-list ;; lists
#:remove-plist-keys #:remove-plist-key ;; plists
......@@ -114,7 +114,7 @@
(error "Failed to locate debug utility file: ~S" utility-file))))))
(defmacro :DBG (tag &rest exprs) ;; NB: universally accessible in the KEYWORD package
"debug macro for print-debugging:
"debug macro for print-debugging from UIOP:
TAG is typically a constant string or keyword to identify who is printing,
but can be an arbitrary expression returning a tag to be princ'ed first;
if the expression returns NIL, nothing is printed.
......
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