[armedbear-devel] jar pathnames should be :ABSOLUTE

Mark Evenson evenson at panix.com
Mon Mar 15 08:08:37 UTC 2010


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.

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