0.9.15.25: COMPILE-FILE-PATHNAME when output-file doesn't have a type
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 10 Aug 2006 12:48:45 +0000 (12:48 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 10 Aug 2006 12:48:45 +0000 (12:48 +0000)
 * Bug reported by Robert Dodier.

NEWS
src/compiler/main.lisp
tests/pathnames.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 4fca016..788c122 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,9 @@ changes in sbcl-0.9.16 relative to sbcl-0.9.15:
   * bug fix: format strings with ~> without matching ~< no longer
     trigger an AVER, but signal an understandable error instead.
     (reported by Antonio Martinez)
+  * bug fix: specifying an output-file without a pathname-type for
+    COMPILE-FILE or COMPILE-FILE-PATHNAME resulted in using the type
+    of input-file instead of "fasl". (reported by Robert Dodier)
 
 changes in sbcl-0.9.15 relative to sbcl-0.9.14:
   * added support for the ucs-2 external format.  (contributed by Ivan
index c3afdc7..8e4e154 100644 (file)
@@ -1708,13 +1708,14 @@ SPEED and COMPILATION-SPEED optimization values, and the
 ;;; -- WHN 2000-12-09
 (defun sb!xc:compile-file-pathname (input-file
                                     &key
-                                    (output-file (cfp-output-file-default
-                                                  input-file))
+                                    (output-file nil output-file-p)
                                     &allow-other-keys)
   #!+sb-doc
   "Return a pathname describing what file COMPILE-FILE would write to given
    these arguments."
-  (merge-pathnames output-file (merge-pathnames input-file)))
+  (if output-file-p
+      (merge-pathnames output-file (cfp-output-file-default input-file))
+      (cfp-output-file-default input-file)))
 \f
 ;;;; MAKE-LOAD-FORM stuff
 
index e6b5d10..845d70f 100644 (file)
 (assert (eq :false
             (if (ignore-errors (merge-pathnames sb-sys::*tty*)) :true :false)))
 
+;;; This used to return "quux/bar.lisp"
+(assert (equal #p"quux/bar.fasl"
+               (let ((*default-pathname-defaults* #p"quux/"))
+                 (compile-file-pathname "foo.lisp" :output-file "bar"))))
+(assert (equal #p"quux/bar.fasl"
+               (let ((*default-pathname-defaults* #p"quux/"))
+                 (compile-file-pathname "bar.lisp"))))
 \f
 ;;;; success
index 625c1e7..fcc68b6 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.15.24"
+"0.9.15.25"