[I CC just in case the ECL mailing list provides me a better answer]
In polishing the upcoming ECL release I discovered that there are two problems when trying to compile cl-unicode. One is due to a bug in ECL, the other one is due to what I believe an error in CL-UNICODE. More precisely, in build/dump.lisp I find
(with-output-to-source-file (out (make-pathname :name "derived-properties" :type :unspecific :directory '(:relative :up "test")) :no-header-p t)
As far as I know, :UNSPECIFIC is reserved for values that do not make sense for a filesystem, but in this particular case what happens is that the file does not have a file extension, not that extensions (types) do not exist at all.
The consequence is that this lisp form creates an unprintable pathname (one which cannot be written "readably"), both in ECL and CLISP, and ECL righteously complains that this file can not be opened.
I believe the appropriate line should be ":type nil", which works on SBCL, CLISP and ECL, AFAIK.
Am I wrong?
Juanjo
P.S.: This is cl-unicode 0.1.1 distributed by quicklisp.
I made the change you proposed (see BKNR repository) but then immediately reverted it again. The problem is that the pathname is only created so that it will be merged afterwards (see with-output-to-source-file). If you use NIL for the type slot, you leave it "open" for MERGE-PATHNAMES to fill which is not what I want. After reading the spec I agree with you, though, that :UNSPECIFIC doesn't look right. Do you have a better idea how to solve this?
Thanks, Edi.
On Wed, Jan 12, 2011 at 4:16 PM, Juan Jose Garcia-Ripoll juanjose.garciaripoll@googlemail.com wrote:
[I CC just in case the ECL mailing list provides me a better answer]
In polishing the upcoming ECL release I discovered that there are two problems when trying to compile cl-unicode. One is due to a bug in ECL, the other one is due to what I believe an error in CL-UNICODE. More precisely, in build/dump.lisp I find
(with-output-to-source-file (out (make-pathname :name "derived-properties" :type :unspecific :directory '(:relative :up "test")) :no-header-p t)
As far as I know, :UNSPECIFIC is reserved for values that do not make sense for a filesystem, but in this particular case what happens is that the file does not have a file extension, not that extensions (types) do not exist at all.
The consequence is that this lisp form creates an unprintable pathname (one which cannot be written "readably"), both in ECL and CLISP, and ECL righteously complains that this file can not be opened.
I believe the appropriate line should be ":type nil", which works on SBCL, CLISP and ECL, AFAIK.
Am I wrong?
Juanjo
P.S.: This is cl-unicode 0.1.1 distributed by quicklisp.
-- Instituto de Física Fundamental, CSIC c/ Serrano, 113b, Madrid 28006 (Spain) http://juanjose.garciaripoll.googlepages.com
cl-ppcre-devel site list cl-ppcre-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/cl-ppcre-devel
I will look at the code and see how it is used. I thought it was directly passed to open but now I see that the with-... macro is not a standard one. What about merging in a way that does not pass the extensions? What about
(merge-pathnames ,relative-path (make-pathname :name nil :type nil *this-file*))
instead of
(merge-pathnames ,relative-path *this-file*)
Juanjo
This patch seems to fix everything and let cl-unicode build with ECL
--- dump-orig.lisp 2011-01-12 22:37:54.000000000 +0100 +++ dump.lisp 2011-01-12 22:32:17.000000000 +0100 @@ -105,7 +105,8 @@ writes to the file denoted by RELATIVE-PATH - a path relative to the location of this source file. Writes a Lisp header to the files unless NO-HEADER-P is true." - `(let ((pathname (merge-pathnames ,relative-path *this-file*))) + `(let ((pathname (merge-pathnames ,relative-path + (make-pathname :name nil :type nil *this-file*)))) (format t "~&;;; Writing source file ~A" (file-namestring pathname)) (force-output) (with-open-file (,stream pathname
I'm surprised that it works for your because there's a keyword missing in the call to make-pathname. But the general idea is of course correct and I've committed this to the BKNR repository now.
Thanks, Edi.
On Wed, Jan 12, 2011 at 10:39 PM, Juan Jose Garcia-Ripoll juanjose.garciaripoll@googlemail.com wrote:
This patch seems to fix everything and let cl-unicode build with ECL --- dump-orig.lisp 2011-01-12 22:37:54.000000000 +0100 +++ dump.lisp 2011-01-12 22:32:17.000000000 +0100 @@ -105,7 +105,8 @@ writes to the file denoted by RELATIVE-PATH - a path relative to the location of this source file. Writes a Lisp header to the files unless NO-HEADER-P is true."
- `(let ((pathname (merge-pathnames ,relative-path *this-file*)))
- `(let ((pathname (merge-pathnames ,relative-path
- (make-pathname :name nil :type nil
*this-file*)))) (format t "~&;;; Writing source file ~A" (file-namestring pathname)) (force-output) (with-open-file (,stream pathname
-- Instituto de Física Fundamental, CSIC c/ Serrano, 113b, Madrid 28006 (Spain) http://juanjose.garciaripoll.googlepages.com
cl-ppcre-devel site list cl-ppcre-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/cl-ppcre-devel
On Wed, Jan 12, 2011 at 11:41 PM, Edi Weitz edi@weitz.de wrote:
I'm surprised that it works for your because there's a keyword missing in the call to make-pathname. But the general idea is of course correct and I've committed this to the BKNR repository now.
Probably because I had to rewrite the patch by hand after messing it up with emacs :-) Thanks for accepting the fix
Juanjo
cl-ppcre-devel@common-lisp.net