[armedbear-devel] jar pathnames should be :ABSOLUTE

Alan Ruttenberg alanruttenberg at gmail.com
Mon Mar 15 13:29:51 UTC 2010


On Mon, Mar 15, 2010 at 4:08 AM, Mark Evenson <evenson at panix.com> wrote:
> On 3/15/10 6:20 AM, Alan Ruttenberg wrote:
> […]
>>
>> Things load up now, however there is something that confuses me:
>>
>> I see load messages like the following (note that there are two "!/"
>> in the pathname.
>>
>> ; Loaded
>> #P"jar:jar:file:/Users/alanr/Desktop/lsw.jar!/lsw/owl/tests/armedbear-0.20.0-dev-darwin-unknown/test-suite.abcl!/"
>> (0.179 seconds)
>>
>> Describe shows that the device is a list of the jar path and
>> directory, and that there is no directory.
>>
>> CL-USER(6): (describe
>>
>> #P"jar:jar:file:/Users/alanr/Desktop/lsw.jar!/lsw/owl/tests/armedbear-0.20.0-dev-darwin-unknown/test-suite.abcl!/")
>>
>> #P"jar:jar:file:/Users/alanr/Desktop/lsw.jar!/lsw/owl/tests/armedbear-0.20.0-dev-darwin-unknown/test-suite.abcl!/"
>> is an object of type PATHNAME:
>>   HOST         NIL
>>   DEVICE       (#P"/Users/alanr/Desktop/lsw.jar"
>> #P"lsw/owl/tests/armedbear-0.20.0-dev-darwin-unknown/test-suite.abcl")
>>   DIRECTORY    NIL
>>   NAME         NIL
>>   TYPE         NIL
>>   VERSION      NIL
>
> This is how the implementation represents a jar within a jar, which is
> necessary for loading FASLs to work.  Remember that a packed ABCL FASL is a
> zip (i.e. jar) file that contains an init FASL (the "*._" file), plus the
> compiled classes (the "*-nnn.cls" where nnn is an increasing integer).  When
> the system loads the packed FASL, it uses MERGE-PATHNAME to combine the name
> of the sub-FASL (i.e. "foo-1.cls") with the *LOAD-TRUENAME* of the FASL (i.e
> "jar:jar:file:/a/b/bar.jar!/foo.abcl!/").
>
> In writing this reply, I realize this probably breaks the use of
> *LOAD-TRUENAME*/*LOAD-PATHNAME* to code that finds itself in a packed FASL
> in a jar.  Such code would probably be much happier if its *LOAD-PATHNAME*
> were
>
>        jar:file:/a/b/bar.jar!/foo.abcl
>
> while its *LOAD-TRUENAME* remained
>
>        jar:jar:file/a/b/bar.jar!/foo.abcl!/
>
> Or maybe both should not have the double jar syntax, so that MERGE-PATHNAME
> would do the right thing?  I introduced another special
> (SYS::*LOAD-TRUENAME-FASL*) where we can keep the "real" value.

OK, I admit my head is hurting now. My gut is that when loading
compiled files, one expects *load-truename* and *load-pathname* to be
the same sort of thing as when loading the lisp source. It's an
implementation detail that the compiled file is a jar.

In other cases, I don't know.

>
> Holler back if y'all agree with this modification, and I'll try to find time
> to implement it soon.
>
> --
> "A screaming comes across the sky.  It has happened before, but there
> is nothing to compare to it now."
>




More information about the armedbear-devel mailing list