|
From: <cli...@li...> - 2010-12-15 01:24:18
|
Send clisp-cvs mailing list submissions to cli...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/clisp-cvs or, via email, send a message with subject or body 'help' to cli...@li... You can reach the person managing the list at cli...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of clisp-cvs digest..." CLISP CVS commits for today Today's Topics: 1. clisp/doc impbody.xml,1.616,1.617 (Sam Steingold) 2. clisp/tests ChangeLog,1.672,1.673 path.tst,1.94,1.95 (Sam Steingold) 3. clisp/src ChangeLog, 1.7585, 1.7586 NEWS, 1.552, 1.553 defs1.lisp, 1.82, 1.83 init.lisp, 1.303, 1.304 (Sam Steingold) ---------------------------------------------------------------------- Message: 1 Date: Fri, 10 Dec 2010 20:05:41 +0000 From: Sam Steingold <sd...@us...> Subject: clisp/doc impbody.xml,1.616,1.617 To: cli...@li... Message-ID: <E1P...@sf...> Update of /cvsroot/clisp/clisp/doc In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv20902/doc Modified Files: impbody.xml Log Message: Fix bug#3124200: setting *DEFAULT-PATHNAME-DEFAULTS* breaks REQUIRE * src/init.lisp (open-for-load): accept ignore-pathname-defaults and do not call MERGE-PATHNAMES if it is non-NIL; use PROBE-PATHNAME instead of DIRECTORY to probe for a directory (load): accept :IGNORE-PATHNAME-DEFAULTS and pass it to OPEN-FOR-LOAD; pathname merging is done in OPEN-FOR-LOAD (search-file): call PATHNAME instead of MERGE-PATHNAMES on the argument to avoid being killed by *DEFAULT-PATHNAME-DEFAULTS* * src/defs1.lisp (with-augmented-load-path): do not use UNION since the augmentations must come first in *LOAD-PATHS* (simple-require): pass :IGNORE-PATHNAME-DEFAULTS T to LOAD Index: impbody.xml =================================================================== RCS file: /cvsroot/clisp/clisp/doc/impbody.xml,v retrieving revision 1.616 retrieving revision 1.617 diff -u -d -r1.616 -r1.617 --- impbody.xml 7 Dec 2010 22:23:44 -0000 1.616 +++ impbody.xml 10 Dec 2010 20:05:39 -0000 1.617 @@ -5327,7 +5327,8 @@ ((&print-k; &load-print-var;) &load-print-var;) ((&echo-k; &load-echo;) &load-echo;) &if-does-not-exist; ((&compiling-k; &load-comp;) &load-comp;) &extra-file-types-k; - ((&obsolete-action-k; &load-obs;) &load-obs;)) + ((&obsolete-action-k; &load-obs;) &load-obs;) + (ignore-pathname-defaults nil)) </programlisting> <variablelist> @@ -5395,6 +5396,10 @@ <indexterm id="load-obs" significance="preferred"> <primary>*LOAD-OBSOLETE-ACTION*</primary></indexterm></firstterm>, which is initially &nil;.</para></listitem></varlistentry> + <varlistentry><term><constant>:IGNORE-PATHNAME-DEFAULTS</constant></term> + <listitem><simpara>Do not merge &default-pathname-defaults-var; to the + argument using &merge-pathnames; (as required by &ansi-cl;) and rely + on &load-paths; instead.</simpara></listitem></varlistentry> </variablelist> <para>The variables &load-verbose-var;, &load-print-var;, ------------------------------ Message: 2 Date: Fri, 10 Dec 2010 20:05:41 +0000 From: Sam Steingold <sd...@us...> Subject: clisp/tests ChangeLog,1.672,1.673 path.tst,1.94,1.95 To: cli...@li... Message-ID: <E1P...@sf...> Update of /cvsroot/clisp/clisp/tests In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv20902/tests Modified Files: ChangeLog path.tst Log Message: Fix bug#3124200: setting *DEFAULT-PATHNAME-DEFAULTS* breaks REQUIRE * src/init.lisp (open-for-load): accept ignore-pathname-defaults and do not call MERGE-PATHNAMES if it is non-NIL; use PROBE-PATHNAME instead of DIRECTORY to probe for a directory (load): accept :IGNORE-PATHNAME-DEFAULTS and pass it to OPEN-FOR-LOAD; pathname merging is done in OPEN-FOR-LOAD (search-file): call PATHNAME instead of MERGE-PATHNAMES on the argument to avoid being killed by *DEFAULT-PATHNAME-DEFAULTS* * src/defs1.lisp (with-augmented-load-path): do not use UNION since the augmentations must come first in *LOAD-PATHS* (simple-require): pass :IGNORE-PATHNAME-DEFAULTS T to LOAD Index: path.tst =================================================================== RCS file: /cvsroot/clisp/clisp/tests/path.tst,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- path.tst 21 Oct 2010 17:13:55 -0000 1.94 +++ path.tst 10 Dec 2010 20:05:39 -0000 1.95 @@ -1349,6 +1349,32 @@ (rmrf dir))) #+(and clisp unicode) (1234 T) +#+clisp ;; bug#3124200 +(let* ((dir "tmp-dir/") + (file (ext:string-concat dir "foo.lisp"))) + (ext:make-directory dir) + (with-open-file (out file :direction :output) + (write-line "(defparameter *load-var* 100)" out)) + (unwind-protect + (list (load "foo" :if-does-not-exist nil) + (equalp (load file) (truename file)) *load-var* + (let ((*load-paths* (list dir))) + (setq *load-var* 3) (load "foo") *load-var*) + (let ((*load-paths* (list dir)) + (*default-pathname-defaults* (ext:cd))) + (setq *load-var* 3) (load "foo" :if-does-not-exist nil) *load-var*) + (block nil + (handler-bind ((file-error (lambda (c) (princ c) (return 'file-error)))) + (require "foo"))) + (let ((*load-paths* (list dir))) + (setq *load-var* 3) (require "foo") *load-var*) + (let ((*load-paths* (list dir)) + (*default-pathname-defaults* (ext:cd))) + (setq *load-var* 3) (require "foo") *load-var*)) + (delete-file file) + (ext:delete-directory dir))) +#+clisp (NIL T 100 100 3 FILE-ERROR 100 100) + (progn (symbol-cleanup '*dir*) (symbol-cleanup 'a) Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/tests/ChangeLog,v retrieving revision 1.672 retrieving revision 1.673 diff -u -d -r1.672 -r1.673 --- ChangeLog 29 Nov 2010 21:42:49 -0000 1.672 +++ ChangeLog 10 Dec 2010 20:05:39 -0000 1.673 @@ -1,3 +1,8 @@ +2010-12-10 Sam Steingold <sd...@gn...> + + * path.tst: add a test for bug#3124200: + setting *DEFAULT-PATHNAME-DEFAULTS* breaks REQUIRE + 2010-11-29 Sam Steingold <sd...@gn...> * streams.tst: add a test for bug#3122505: LOAD bad FAS ------------------------------ Message: 3 Date: Fri, 10 Dec 2010 20:05:41 +0000 From: Sam Steingold <sd...@us...> Subject: clisp/src ChangeLog, 1.7585, 1.7586 NEWS, 1.552, 1.553 defs1.lisp, 1.82, 1.83 init.lisp, 1.303, 1.304 To: cli...@li... Message-ID: <E1P...@sf...> Update of /cvsroot/clisp/clisp/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv20902/src Modified Files: ChangeLog NEWS defs1.lisp init.lisp Log Message: Fix bug#3124200: setting *DEFAULT-PATHNAME-DEFAULTS* breaks REQUIRE * src/init.lisp (open-for-load): accept ignore-pathname-defaults and do not call MERGE-PATHNAMES if it is non-NIL; use PROBE-PATHNAME instead of DIRECTORY to probe for a directory (load): accept :IGNORE-PATHNAME-DEFAULTS and pass it to OPEN-FOR-LOAD; pathname merging is done in OPEN-FOR-LOAD (search-file): call PATHNAME instead of MERGE-PATHNAMES on the argument to avoid being killed by *DEFAULT-PATHNAME-DEFAULTS* * src/defs1.lisp (with-augmented-load-path): do not use UNION since the augmentations must come first in *LOAD-PATHS* (simple-require): pass :IGNORE-PATHNAME-DEFAULTS T to LOAD Index: NEWS =================================================================== RCS file: /cvsroot/clisp/clisp/src/NEWS,v retrieving revision 1.552 retrieving revision 1.553 diff -u -d -r1.552 -r1.553 --- NEWS 25 Nov 2010 17:03:48 -0000 1.552 +++ NEWS 10 Dec 2010 20:05:39 -0000 1.553 @@ -2,8 +2,7 @@ --------------- * All .fas files generated by previous CLISP versions are invalid and - must be recompiled. This is because the Just-In-Time Compiled code is - kept with the closures. + must be recompiled (this was made necessary by the fix to bug#3040648). Set CUSTOM:*LOAD-OBSOLETE-ACTION* to :COMPILE to automate this. See <http://clisp.cons.org/impnotes/system-dict.html#loadfile> for details. @@ -48,6 +47,8 @@ + Fix PROBE-PATHNAME behavior on win32 and on open file streams (bug#3087668). + Fix handling of huge byte arrays on 64-bit platforms (bug#3088751). + Macro LOOP now detects incomplete FOR clauses (bug#3089988). + + Fix LOADing corrupt FAS files (bug#3122505). + + Fix interaction of *DEFAULT-PATHNAME-DEFAULTS* with REQUIRE (bug#3124200). 2.49 (2010-07-07) Index: init.lisp =================================================================== RCS file: /cvsroot/clisp/clisp/src/init.lisp,v retrieving revision 1.303 retrieving revision 1.304 diff -u -d -r1.303 -r1.304 --- init.lisp 2 Dec 2010 00:22:33 -0000 1.303 +++ init.lisp 10 Dec 2010 20:05:39 -0000 1.304 @@ -1584,6 +1584,7 @@ (sys::%putd 'ext::muffle-cerrors #'identity)) (defun open-for-load (filename extra-file-types external-format + ignore-pathname-defaults &aux stream (present-files t) obj path bad-file) (block open-for-load (when (and (streamp filename) @@ -1615,15 +1616,14 @@ (bad last-p stream (TEXT "~S: compiled file ~A has a corrupt version marker ~S"))) (or (equal (system::version) (eval (second obj))) (bad last-p stream (TEXT "~S: compiled file ~A was created by an older CLISP version and needs to be recompiled")))))) - (setq filename (pathname filename) - ;; appending "/" to a logical pathname makes it invalid - path (if (logical-pathname-p filename) - (translate-logical-pathname filename) - filename)) + (setq filename (if ignore-pathname-defaults + (pathname filename) (merge-pathnames filename)) + path filename) ;; (OPEN "foo") errors out if we do (LOAD "foo") ;; and both "foo.lisp" and "foo/" are present - (unless (directory (string-concat (namestring path) "/")) - (setq stream (my-open path))) + (let ((truename? (probe-pathname path))) + (unless (and truename? (null (pathname-name truename?))) + (setq stream (my-open path)))) (tagbody proceed (when (and stream (if (compiledp stream) @@ -1726,9 +1726,11 @@ ((:obsolete-action *load-obsolete-action*) *load-obsolete-action*) (extra-file-types '()) + (ignore-pathname-defaults nil) &aux stream) (multiple-value-setq (stream filename) - (open-for-load filename extra-file-types external-format)) + (open-for-load filename extra-file-types external-format + ignore-pathname-defaults)) (if (null stream) (if if-does-not-exist (error-of-type 'file-error @@ -1743,7 +1745,7 @@ (*load-level* (1+ *load-level*)) (*load-input-stream* input-stream) (*load-pathname* - (if (pathnamep filename) (merge-pathnames filename) nil)) + (if (pathnamep filename) filename nil)) (*load-truename* (if (pathnamep filename) (truename filename) nil)) (*current-source-file* *load-truename*) @@ -2176,7 +2178,12 @@ ;; starting up (unless -norc or -E 1:1 is passed) ;; because (DIRECTORY "~/*") fails (let* ((already-searched nil) found - (path-nonW (merge-pathnames filename)) + ;; not (merge-pathnames filename) because filename can come + ;; from `load-logical-pathname-translations' or `require' + ;; and must be searched in "implementation-defined" locations + ;; while `*default-pathname-defaults*' may contain a directore + ;; which would preclude searching + (path-nonW (pathname filename)) (path-wild (if (pathname-name path-nonW) (merge-pathnames path-nonW '#P"*.*") ;; do not append *.* to directories Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.7585 retrieving revision 1.7586 diff -u -d -r1.7585 -r1.7586 --- ChangeLog 10 Dec 2010 17:01:12 -0000 1.7585 +++ ChangeLog 10 Dec 2010 20:05:39 -0000 1.7586 @@ -1,7 +1,21 @@ 2010-12-10 Sam Steingold <sd...@gn...> + Fix bug#3124200: setting *DEFAULT-PATHNAME-DEFAULTS* breaks REQUIRE + * init.lisp (open-for-load): accept ignore-pathname-defaults and + do not call MERGE-PATHNAMES if it is non-NIL; + use PROBE-PATHNAME instead of DIRECTORY to probe for a directory + (load): ccept :IGNORE-PATHNAME-DEFAULTS and pass it to OPEN-FOR-LOAD; + pathname merging is done in OPEN-FOR-LOAD + (search-file): call PATHNAME instead of MERGE-PATHNAMES on the + argument to avoid being killed by *DEFAULT-PATHNAME-DEFAULTS* + * defs1.lisp (with-augmented-load-path): do not use UNION since + the augmentations must come first in *LOAD-PATHS* + (simple-require): pass :IGNORE-PATHNAME-DEFAULTS T to LOAD + +2010-12-10 Sam Steingold <sd...@gn...> + * modules/asdf/asdf.lisp: update to upstream "2.011" - * src/gmalloc.c: update to upstream + * src/gmalloc.c: update from upstream (emacs) 2010-12-10 Sam Steingold <sd...@gn...> Index: defs1.lisp =================================================================== RCS file: /cvsroot/clisp/clisp/src/defs1.lisp,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- defs1.lisp 2 Dec 2010 23:33:49 -0000 1.82 +++ defs1.lisp 10 Dec 2010 20:05:39 -0000 1.83 @@ -169,11 +169,13 @@ :defaults *compile-file-pathname*))))) (defmacro with-augmented-load-path (dirs &body body) - `(let ((*load-paths* - ;; the name "dynmod/" used here should be in sync with clisp-link - (union *load-paths* - ,(if dirs `(list ,@dirs) '(load-path-augmentations "dynmod/")) - :test #+win32 #'equalp #-win32 #'equal))) + `(let ((*load-paths* *load-paths*)) + ;; cannot use UNION because DIRS must come _first_ in *LOAD-PATHS* + ;; the name "dynmod/" used here should be in sync with clisp-link + (dolist (path ,(if dirs + `(list ,@dirs) + '(load-path-augmentations "dynmod/"))) + (pushnew path *load-paths* :test #+win32 #'equalp #-win32 #'equal)) ,@body)) (defvar *module-provider-functions* '() @@ -181,7 +183,9 @@ (defun simple-require (pathname) (with-augmented-load-path () - (if (atom pathname) (load pathname) (mapcar #'load pathname)))) + (if (atom pathname) + (load pathname :ignore-pathname-defaults t) + (mapcar (lambda (p) (load p :ignore-pathname-defaults t)) pathname)))) (defun require (module-name &optional (pathname nil p-given)) (setq module-name (module-name module-name)) ------------------------------ ------------------------------------------------------------------------------ Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev ------------------------------ _______________________________________________ clisp-cvs mailing list cli...@li... https://lists.sourceforge.net/lists/listinfo/clisp-cvs End of clisp-cvs Digest, Vol 56, Issue 5 **************************************** |