[armedbear-devel] loading from jar files

Alan Ruttenberg alanruttenberg at gmail.com
Fri Jan 8 03:06:43 UTC 2010

On Thu, Jan 7, 2010 at 6:59 AM, Alessio Stalla <alessiostalla at gmail.com> wrote:
> On Thu, Jan 7, 2010 at 9:17 AM, Alan Ruttenberg
> <alanruttenberg at 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 ...

; Loaded jar:file:/Users/alanr/repos/lsw/trunk/patches/test2.jar!/test.abcl
(0.0010 seconds)

(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

; Loaded jar:file:/Users/alanr/repos/lsw/trunk/patches/test3.jar!/in/test.lisp
(0.0020 seconds)

(load "jar:file:/Users/alanr/repos/lsw/trunk/patches/test4.jar!/in/test.abcl")
	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.


More information about the armedbear-devel mailing list