Changeset 12433


Ignore:
Timestamp:
02/08/10 12:59:35 (13 years ago)
Author:
Mark Evenson
Message:

Update jar pathname design document with current implementation status.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/doc/design/pathnames/abcl-jar-url.text

    r12422 r12433  
    44Mark Evenson
    55Created: 09 JAN 2010
    6 Modified: 24 JAN 2010
     6Modified: 08 FEB 2010
    77
    88Notes towards sketching an implementation of "jar:" references to be
    9 contained in PATHNAMEs within ABCL
    10 
     9contained in PATHNAMEs within ABCL. 
    1110
    1211Goals
     
    3130    #p"jar:jar:http://example.org/abcl.jar!/foo.abcl!/foo-1.cls"
    3231
    33 3.  MERGE-PATHNAMES working for JAR entries
     323.  MERGE-PATHNAMES working for JAR entries in the following use cases:
    3433
    3534    (merge-pathnames "foo-1.cls" "jar:jar:file:baz.jar!/foo.abcl!/foo._")
     
    47466.  References "jar:<URL>" for all strings <URL> that java.net.URL can
    4847    resolve works.
     48
     497.  Make jar pathnames work as a valid argument for OPEN.
     50
     518.  Enable the loading of ASDF systems packaged within jar files.
     52
     53Status
     54------
     55
     56As of svn r12431, all the above goals have been implemented and tested
     57*except* for:
     58
     595.  DIRECTORY working within JAR files
     60
     617.  Make jar pathnames work as a valid argument for OPEN.
    4962
    5063
     
    7083
    7184*   If the DEVICE is a String it must be a String that successfully
    72     constructs a URL via the java.net.URL(String) constructor
     85    references a URL via the java.net.URL(String) constructor
    7386
    7487*   Only the first entry in the the DEVICE list may be a String.
     
    98111
    99112
    100 // UC1 -- JAR entry
     113// UC2 -- JAR entry
    101114pathname: {
    102115  namestring: "jar:file:baz.jar!/foo.abcl"
     
    217230
    218231
    219  
    220 Problems
    221 --------
    222 
    223 1.  DEVICE PATHNAMES require the context within the nested PATHNAME
    224     structure to be interpreted correctly.
    225 
    226 Result:    Be careful when manipulating PATHNAMEs that refer to JARs
    227 
    228 
    229232History
    230233-------
    231234
    232 In the use of PATHNAMEs linked by the DEVICE field, we found the problem
    233 that UNC path support uses the DEVICE field
    234 
    235 Result:    JARs located on UNC mounts can't be referenced. via '\\'.
     235Previously, ABCL did have some support for jar pathnames. This support
     236used the convention that the if the device field was itself a
     237pathname, the device pathname contained the location of the jar.
     238
     239In the analysis of the desire to treat jar pathnames as valid
     240locations for LOAD, we determined that we needed a "double" pathname
     241so we could refer to the components of a packed FASL in jar.  At first
     242we thought we could support such a syntax by having the device
     243pathname's device refer to the inner jar.  But with in this use of
     244PATHNAMEs linked by the DEVICE field, we found the problem that UNC
     245path support uses the DEVICE field so JARs located on UNC mounts can't
     246be referenced. via '\\'.
    236247
    237248           i.e.  jar:jar:file:\\server\share\a\b\foo.jar!/this\that!/foo.java
    238249
    239 would not have
    240 
    241 Solution:  Instead of having DEVICE point to a PATHNAME, have DEVICE
    242 be a list of PATHNAMES
     250would not have a valid representation.
     251
     252So instead of having DEVICE point to a PATHNAME, we decided that the
     253DEVICE shall be a list of PATHNAMES, so we would have:
    243254
    244255pathname: {
    245256  namestring: "jar:jar:file:\\server\share\foo.jar!/foo.abcl!/"
    246   device: ( pathname: {
    247               name: "foo"
    248               type: "abcl"
    249             }
     257  device: (
    250258            pathname: {
    251259              host: "server"
     
    254262              type: "jar"
    255263            }
    256 }
    257 
    258 Which order for the list? Outermost first or last?  Outermost first.
    259 
     264            pathname: {
     265              name: "foo"
     266              type: "abcl"
     267            }
     268}
     269
     270Although there is a fair amount of special logic inside Pathname.java
     271itself in the resulting implementation, the logic in Load.java seems
     272to have been considerably simplified. 
     273
Note: See TracChangeset for help on using the changeset viewer.