Seems like the extension is ignored and either lisp or .abcls files are loaded. This means that .asd files are not (an error is thrown) It also means that requests for files that don't exist get satisfied, e.g. if you give it a bogus filetype but there is a .lisp or .abcl file present.
e.g.
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar1.li") ; Loading jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar1.li ...
Whoops - there is no bar1.li, just bar1.lisp
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar.asd")
The file #P"jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar.asd" does not exist.
Whoops - it does so!
-Alan
On 1/7/10 9:17 AM, Alan Ruttenberg wrote:
Seems like the extension is ignored and either lisp or .abcls files are loaded. This means that .asd files are not (an error is thrown) It also means that requests for files that don't exist get satisfied, e.g. if you give it a bogus filetype but there is a .lisp or .abcl file present.
e.g.
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar1.li") ; Loading jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar1.li ...
Whoops - there is no bar1.li, just bar1.lisp
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar.asd")
The file #P"jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar.asd" does not exist.
Whoops - it does so!
Acknowledged. Unfortunately, there seems to be something a bit funky with the jarfile functionality in SVN trunk as some of tests that were passing before now seem to be failing, so I need a bit of time to investigate.
I'll revisit the jarfile support in the next few days to try to stabilize for the upcoming release.
On Thu, Jan 7, 2010 at 9:17 AM, Alan Ruttenberg alanruttenberg@gmail.com wrote:
Seems like the extension is ignored and either lisp or .abcls files are loaded. This means that .asd files are not (an error is thrown) It also means that requests for files that don't exist get satisfied, e.g. if you give it a bogus filetype but there is a .lisp or .abcl file present.
e.g.
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar1.li") ; Loading jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar1.li ...
Whoops - there is no bar1.li, just bar1.lisp
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar.asd")
The file #P"jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar.asd" does not exist.
Whoops - it does so!
I cannot reproduce it fully on trunk. I can load .asd files just fine. I get the "bar.li" behaviour too - we should probably add .abcl or .lisp only if the name has no extension, to avoid confusion; that's what sbcl does, and probably most other lisps.
I recently modified readFunctionBytes in Lisp.java to be able to load stuff from remote jars (i.e. when the protocol is jar:x and x is not "file"); that may have something to do with it, and maybe with Mark's test failures too.
Alessio
On Thu, Jan 7, 2010 at 6:59 AM, Alessio Stalla alessiostalla@gmail.com wrote:
On Thu, Jan 7, 2010 at 9:17 AM, Alan Ruttenberg alanruttenberg@gmail.com wrote:
Seems like the extension is ignored and either lisp or .abcls files are loaded. This means that .asd files are not (an error is thrown) It also means that requests for files that don't exist get satisfied, e.g. if you give it a bogus filetype but there is a .lisp or .abcl file present.
e.g.
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar1.li") ; Loading jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar1.li ...
Whoops - there is no bar1.li, just bar1.lisp
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar.asd")
The file #P"jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar.asd" does not exist.
Whoops - it does so!
I cannot reproduce it fully on trunk. I can load .asd files just fine. I get the "bar.li" behaviour too - we should probably add .abcl or .lisp only if the name has no extension, to avoid confusion; that's what sbcl does, and probably most other lisps.
I recently modified readFunctionBytes in Lisp.java to be able to load stuff from remote jars (i.e. when the protocol is jar:x and x is not "file"); that may have something to do with it, and maybe with Mark's test failures too.
Alessio
So tonight I'm seeing an asd file load properly. However loading an fasl from a subdirectory within a jar file fails.
jar cf test2.jar test.abcl jar cf test3.jar in/test.lisp jar cf test4.jar in/test.abcl
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test2.jar!/test.abcl") ; Loading jar:file:/Users/alanr/repos/lsw/trunk/patches/test2.jar!/test.abcl ...
HELLO-FROM-JAR ; Loaded jar:file:/Users/alanr/repos/lsw/trunk/patches/test2.jar!/test.abcl (0.0010 seconds) T
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test3.jar!/in/test.lisp") ; Loading jar:file:/Users/alanr/repos/lsw/trunk/patches/test3.jar!/in/test.lisp ...
HELLO-FROM-JAR ; Loaded jar:file:/Users/alanr/repos/lsw/trunk/patches/test3.jar!/in/test.lisp (0.0020 seconds) T
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test4.jar!/in/test.abcl") java.lang.NullPointerException at org.armedbear.lisp.Utilities.getZippedZipEntryAsByteArray(Utilities.java:153) at org.armedbear.lisp.Utilities.getZippedZipEntryAsInputStream(Utilities.java:177) at org.armedbear.lisp.Load.load(Load.java:231) at org.armedbear.lisp.Load.load(Load.java:754) ...
I'll see if I can figure if there was something real about the asd load issue I had yesterday or it was a case of bleary eyes.
-Alan
On Thu, Jan 7, 2010 at 10:06 PM, Alan Ruttenberg alanruttenberg@gmail.com wrote:
I'll see if I can figure if there was something real about the asd load issue I had yesterday or it was a case of bleary eyes.
Blearly eyes. The issue was that it was a real system def and asdf depends on truename working and truename doesn't work with jar:file: pathnames. Patching those, it works.
-Alan
On Fri, Jan 8, 2010 at 4:06 AM, Alan Ruttenberg alanruttenberg@gmail.com wrote:
On Thu, Jan 7, 2010 at 6:59 AM, Alessio Stalla alessiostalla@gmail.com wrote:
On Thu, Jan 7, 2010 at 9:17 AM, Alan Ruttenberg alanruttenberg@gmail.com wrote:
Seems like the extension is ignored and either lisp or .abcls files are loaded. This means that .asd files are not (an error is thrown) It also means that requests for files that don't exist get satisfied, e.g. if you give it a bogus filetype but there is a .lisp or .abcl file present.
e.g.
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar1.li") ; Loading jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar1.li ...
Whoops - there is no bar1.li, just bar1.lisp
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar.asd")
The file #P"jar:file:/Users/alanr/repos/lsw/trunk/patches/test.jar!/bar/bar.asd" does not exist.
Whoops - it does so!
I cannot reproduce it fully on trunk. I can load .asd files just fine. I get the "bar.li" behaviour too - we should probably add .abcl or .lisp only if the name has no extension, to avoid confusion; that's what sbcl does, and probably most other lisps.
I recently modified readFunctionBytes in Lisp.java to be able to load stuff from remote jars (i.e. when the protocol is jar:x and x is not "file"); that may have something to do with it, and maybe with Mark's test failures too.
Alessio
So tonight I'm seeing an asd file load properly. However loading an fasl from a subdirectory within a jar file fails.
jar cf test2.jar test.abcl jar cf test3.jar in/test.lisp jar cf test4.jar in/test.abcl
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test2.jar!/test.abcl") ; Loading jar:file:/Users/alanr/repos/lsw/trunk/patches/test2.jar!/test.abcl ...
HELLO-FROM-JAR ; Loaded jar:file:/Users/alanr/repos/lsw/trunk/patches/test2.jar!/test.abcl (0.0010 seconds) T
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test3.jar!/in/test.lisp") ; Loading jar:file:/Users/alanr/repos/lsw/trunk/patches/test3.jar!/in/test.lisp ...
HELLO-FROM-JAR ; Loaded jar:file:/Users/alanr/repos/lsw/trunk/patches/test3.jar!/in/test.lisp (0.0020 seconds) T
(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test4.jar!/in/test.abcl") java.lang.NullPointerException at org.armedbear.lisp.Utilities.getZippedZipEntryAsByteArray(Utilities.java:153) at org.armedbear.lisp.Utilities.getZippedZipEntryAsInputStream(Utilities.java:177) at org.armedbear.lisp.Load.load(Load.java:231) at org.armedbear.lisp.Load.load(Load.java:754) ...
What do those .abcl files contain? It seems to me that loading them fails because they're always assumed to be zip files, while they can also be plain text files (that's what happens at line 231 of Load.java); however, this is (apparently) unrelated to whether they are in a subdirectory or not, so I'm not sure we're observing the same problem.
Ale
What do those .abcl files contain? It seems to me that loading them fails because they're always assumed to be zip files, while they can also be plain text files (that's what happens at line 231 of Load.java); however, this is (apparently) unrelated to whether they are in a subdirectory or not, so I'm not sure we're observing the same problem.
Ale
Here's the test. Both files are the same .abcl, compiled from a one line lisp program. The only difference is that one is in a subdirectory.
laptop:~/repos/lsw/trunk/patches % cat test.lisp (print 'hello-from-jar)
(compile-file "~/lsw/patches/test.lisp") ; Compiling /Users/alanr/repos/lsw/trunk/patches/test.lisp ... ; (PRINT (QUOTE HELLO-FROM-JAR)) ; Wrote /Users/alanr/lsw/patches/test.abcl (0.083 seconds) #P"/Users/alanr/repos/lsw/trunk/patches/test.abcl"
laptop:~/repos/lsw/trunk/patches % mkdir sub laptop:~/repos/lsw/trunk/patches % cp test.abcl sub laptop:~/repos/lsw/trunk/patches % jar cf test9.jar test.abcl laptop:~/repos/lsw/trunk/patches % jar cf test10.jar sub/test.abcl laptop:~/repos/lsw/trunk/patches % jar tf test9.jar META-INF/ META-INF/MANIFEST.MF test.abcl laptop:~/repos/lsw/trunk/patches % jar tf test10.jar META-INF/ META-INF/MANIFEST.MF sub/test.abcl
CL-USER(7): (load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test9.jar!/test.abcl") ; Loading jar:file:/Users/alanr/repos/lsw/trunk/patches/test9.jar!/test.abcl ...
HELLO-FROM-JAR ; Loaded jar:file:/Users/alanr/repos/lsw/trunk/patches/test9.jar!/test.abcl (0.0020 seconds) T CL-USER(8): (load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test10.jar!/sub/test.abcl") java.lang.NullPointerException at org.armedbear.lisp.Utilities.getZippedZipEntryAsByteArray(Utilities.java:153) at org.armedbear.lisp.Utilities.getZippedZipEntryAsInputStream(Utilities.java:177) at org.armedbear.lisp.Load.load(Load.java:231) at org.armedbear.lisp.Load.load(Load.java:754)
On Fri, Jan 8, 2010 at 4:02 PM, Alan Ruttenberg alanruttenberg@gmail.com wrote:
What do those .abcl files contain? It seems to me that loading them fails because they're always assumed to be zip files, while they can also be plain text files (that's what happens at line 231 of Load.java); however, this is (apparently) unrelated to whether they are in a subdirectory or not, so I'm not sure we're observing the same problem.
Ale
Here's the test. Both files are the same .abcl, compiled from a one line lisp program. The only difference is that one is in a subdirectory.
Ok, thank you very much. I found the problem. Load.java passes an incorrect entry name for entries in subdirectories: it keeps the full path, instead of using just the file name. As soon as I get home I will commit the fix.
The other problem I found still remains: when the .abcl is not a packed fasl but a text file (it is so, for example, in abcl.jar itself), we shouldn't die with a NPE, but rather load the file.
Bye, Ale
laptop:~/repos/lsw/trunk/patches % cat test.lisp (print 'hello-from-jar)
(compile-file "~/lsw/patches/test.lisp") ; Compiling /Users/alanr/repos/lsw/trunk/patches/test.lisp ... ; (PRINT (QUOTE HELLO-FROM-JAR)) ; Wrote /Users/alanr/lsw/patches/test.abcl (0.083 seconds) #P"/Users/alanr/repos/lsw/trunk/patches/test.abcl"
laptop:~/repos/lsw/trunk/patches % mkdir sub laptop:~/repos/lsw/trunk/patches % cp test.abcl sub laptop:~/repos/lsw/trunk/patches % jar cf test9.jar test.abcl laptop:~/repos/lsw/trunk/patches % jar cf test10.jar sub/test.abcl laptop:~/repos/lsw/trunk/patches % jar tf test9.jar META-INF/ META-INF/MANIFEST.MF test.abcl laptop:~/repos/lsw/trunk/patches % jar tf test10.jar META-INF/ META-INF/MANIFEST.MF sub/test.abcl
CL-USER(7): (load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test9.jar!/test.abcl") ; Loading jar:file:/Users/alanr/repos/lsw/trunk/patches/test9.jar!/test.abcl ...
HELLO-FROM-JAR ; Loaded jar:file:/Users/alanr/repos/lsw/trunk/patches/test9.jar!/test.abcl (0.0020 seconds) T CL-USER(8): (load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test10.jar!/sub/test.abcl") java.lang.NullPointerException at org.armedbear.lisp.Utilities.getZippedZipEntryAsByteArray(Utilities.java:153) at org.armedbear.lisp.Utilities.getZippedZipEntryAsInputStream(Utilities.java:177) at org.armedbear.lisp.Load.load(Load.java:231) at org.armedbear.lisp.Load.load(Load.java:754)
On Fri, Jan 8, 2010 at 4:47 PM, Alessio Stalla alessiostalla@gmail.com wrote:
On Fri, Jan 8, 2010 at 4:02 PM, Alan Ruttenberg alanruttenberg@gmail.com wrote:
What do those .abcl files contain? It seems to me that loading them fails because they're always assumed to be zip files, while they can also be plain text files (that's what happens at line 231 of Load.java); however, this is (apparently) unrelated to whether they are in a subdirectory or not, so I'm not sure we're observing the same problem.
Ale
Here's the test. Both files are the same .abcl, compiled from a one line lisp program. The only difference is that one is in a subdirectory.
Ok, thank you very much. I found the problem. Load.java passes an incorrect entry name for entries in subdirectories: it keeps the full path, instead of using just the file name. As soon as I get home I will commit the fix.
Committed (rev. 12344).
A.
armedbear-devel@common-lisp.net