#476 closed defect (fixed)
Wrong file type returned by COMPILE-FILE-PATHNAME
Reported by: | Mark Evenson | Owned by: | Mark Evenson |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | compiler | Version: | 1.7.2-dev |
Keywords: | Cc: | ||
Parent Tickets: |
Description (last modified by )
<https://mailman.common-lisp.net/pipermail/armedbear-devel/2020-October/004147.html>
The code below returns "lx64fsl" in CCL, "fas" in CLISP, and "fasl" in SBCL, but returns "lisp" in ABCL. I think it should return "abcl" in ABCL. $ java -jar abcl-1.7.1.jar Armed Bear Common Lisp 1.7.1 Java 1.8.0_272 Oracle Corporation OpenJDK 64-Bit Server VM Low-level initialization completed in 0.586 seconds. Startup completed in 1.336 seconds. Type ":help" for a list of available commands. CL-USER(1): (pathname-type (compile-file-pathname (make-pathname :name "foo" :type "lisp") :output-file (make-pathname :name "bar"))) "lisp" CL-USER(2):
COMPILE-FILE, COMPILE-FILE-PATHNAME disagree on output dir
<https://mailman.common-lisp.net/pipermail/armedbear-devel/2020-October/004151.html>
COMPILE-FILE-PATHNAME is supposed to return "the pathname that COMPILE-FILE would write into, if given the same arguments" but in the example below, COMPILE-FILE-PATHNAME returns "src/obj/foo.abcl" while the file that is actually written into is "obj/foo.abcl". Looking at the spec, my opinion is that COMPILE-FILE is doing the right thing, and COMPILE-FILE-PATHNAME should be changed to match it. I suppose some might disagree with me about which behavior is correct, but no one can disagree that the two functions' behavior should match. $ mkdir src obj $ echo '(format t "~&Hello, world!~%")' > src/foo.lisp $ java -jar abcl-1.7.1.jar Armed Bear Common Lisp 1.7.1 Java 1.8.0_272 Oracle Corporation OpenJDK 64-Bit Server VM Low-level initialization completed in 0.179 seconds. Startup completed in 0.828 seconds. Type ":help" for a list of available commands. CL-USER(1): (defvar *infile* (make-pathname :directory '(:relative "src") :name "foo" :type "lisp")) *INFILE* CL-USER(2): (defvar *outfile* (make-pathname :directory '(:relative "obj") :type "abcl" :defaults *infile*)) *OUTFILE* CL-USER(3): (compile-file *infile* :output-file *outfile*) ; Compiling /tmp/foo/src/foo.lisp ... ; (FORMAT T ...) ; Wrote /tmp/foo/obj/foo.abcl (0.014 seconds) #P"/tmp/foo/obj/foo.abcl" NIL NIL CL-USER(4): (compile-file-pathname *infile* :output-file *outfile*) #P"/tmp/foo/src/obj/foo.abcl" CL-USER(5):
Change History (8)
comment:1 Changed 4 years ago by
Owner: | set to Mark Evenson |
---|---|
Status: | new → accepted |
comment:2 Changed 4 years ago by
Version: | 1.7.1-dev → 1.7.2-dev |
---|
comment:4 Changed 4 years ago by
Fix from Robert Munyer in <https://mailman.common-lisp.net/pipermail/armedbear-devel/2020-November/004162.html> submitted as <https://github.com/armedbear/abcl/pull/343>
comment:5 Changed 4 years ago by
Description: | modified (diff) |
---|
comment:6 Changed 4 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
We now use Robert Munyer's version of compile-file-pathname
<https://abcl.org/trac/changeset/15480>
<https://github.com/armedbear/abcl/commit/d6e3b2f3e02807dc39a05571897f77a058871780>
comment:8 Changed 3 years ago by
Milestone: | 1.8.1 → 1.9.0 |
---|
Note: See
TracTickets for help on using
tickets.
This should be easy.