Commit 5a70e8b6 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

2.29.9: in load-asd, preserve *print-pprint-dispatch* as well as *readtable*.

Although I'd like to isolate .asd files from each other,
copy-readtable and copy-pprint-dispatch are slightly too expensive
to use lightly (cons 1648 and 2192 bytes respectively on CCL 1.9 x86-64,
and more like 5300 and 10300 bytes on SBCL 1.1.3 x86-64).
There is no portable way to ensure the tables are read-only, and
bad things can happen if they are mutated while bound to the standard defaults.
So for now, I'm doing the backward-compatible thing of letting users
take responsibility for binding and mutating them, or more likely for success,
avoiding to bind and mutate them.

Thanks once again to Anton Vodonosov for his help with cl-test-grid.
parent 9423c735
......@@ -74,7 +74,7 @@
:licence "MIT"
:description "Another System Definition Facility"
:long-description "ASDF builds Common Lisp software organized into defined systems."
:version "2.29.8" ;; to be automatically updated by make bump-version
:version "2.29.9" ;; 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.
......
......@@ -256,15 +256,17 @@ Going forward, we recommend new users should be using the source-registry.
(defmacro with-system-definitions ((&optional) &body body)
`(call-with-system-definitions #'(lambda () ,@body)))
(defun load-asd (pathname &key name (external-format (encoding-external-format (detect-encoding pathname))) &aux (readtable *readtable*))
(defun load-asd (pathname &key name (external-format (encoding-external-format (detect-encoding pathname))) &aux (readtable *readtable*) (print-pprint-dispatch *print-pprint-dispatch*))
;; Tries to load system definition with canonical NAME from PATHNAME.
(with-system-definitions ()
(with-standard-io-syntax
(let ((*package* (find-package :asdf-user))
;; Note that our backward-compatible readtable is
;; Note that our backward-compatible *readtable* is
;; a global readtable that gets globally side-effected. Ouch.
;; Same for the *print-pprint-dispatch* table.
;; We should do something about that for ASDF3 if possible, or else ASDF4.
(*readtable* readtable)
(*print-pprint-dispatch* print-pprint-dispatch)
(*print-readably* nil)
(*default-pathname-defaults*
;; resolve logical-pathnames so they won't wreak havoc in parsing namestrings.
......
;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
;;; This is ASDF 2.29.8: Another System Definition Facility.
;;; This is ASDF 2.29.9: Another System Definition Facility.
;;;
;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>.
......
......@@ -52,7 +52,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.29.8")
(asdf-version "2.29.9")
(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