Changeset 14172


Ignore:
Timestamp:
10/08/12 18:07:00 (9 years ago)
Author:
Mark Evenson
Message:

Document current plans for resolution of issues involving the merging with JAR-PATHNAME defaults.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/doc/design/pathnames/merging-defaults.markdown

    r14160 r14172  
    1 # ISSUE MERGE-PATHNAMES with specialization of JAR-PATHNAME and URL-PATHNAME
     1# ISSUE MERGE-PATHNAMES with specialization of JAR-PATHNAME
     2
     3We wish to resolve the following issues.
    24
    35## UC0 Loading jna.jar for CFFI via Quicklisp
    46
    5 This happens in loading systems via ASDF recursively in jars (abcl-contrib.jar)
     7This happens in loading systems via ASDF recursively in jars, most
     8importantly for those packaged in 'abcl-contrib.jar', which prevents
     9CFFI from loading the necessary JNA code.
    610
    7 ## UC1
    8 If *DEFAULT-PATHNAME-DEFAULTS* is a JAR-PATHNAME, commands like
     11## UC1.1
     12If *DEFAULT-PATHNAME-DEFAULTS* is a JAR-PATHNAME, commands that would
     13normally be expected to work such as
    914
    10     CL-USER: (probe-file #"/")
     15    CL-USER> (probe-file #p"/")
    1116   
    1217will fail. 
    1318
     19### UC1.2
    1420
    15 ## Questions
     21If *DEFAULT-PATHNAME-DEFAULTS* is a JAR-PATHNAME, COMPILE-FILE
     22operations specifying an OUTPUT-FILE with a NIL DEVICE will fail, as
     23COMPILE-FILE-PATHNAME is required to merge its arguments with the
     24defaults.
     25
     26## CLHS Citations
     27
     28Some especially relevant portions of the CLHS for consideration.
    1629
    1730###  19.2.3 Merging Pathnames
     31http://www.lispworks.com/documentation/HyperSpec/Body/19_bc.htm
    1832
    19 Except as explicitly specified otherwise, for functions that
     33"Except as explicitly specified otherwise, for functions that
    2034manipulate or inquire about files in the file system, the pathname
    2135argument to such a function is merged with *default-pathname-defaults*
    22 before accessing the file system (as if by merge-pathnames).
     36before accessing the file system (as if by merge-pathnames)."
    2337
    24 Q: Does this mean that the arguments to PARSE-NAMESTRING should not be
    25 merged?
     38Note that this implies that the arguments to PARSE-NAMESTRING--which
     39is what the SHARSIGN-P reader macro correpsponds to--should not be
     40merged.
     41
     42
     43## 19.2.2.2.3 :UNSPECIFIC as a Component Value
     44http://www.lispworks.com/documentation/HyperSpec/Body/19_bbbc.htm
     45
     46"If :unspecific is the value of a pathname component, the component is
     47considered to be ``absent'' or to ``have no meaning'' in the filename
     48being represented by the pathname."
     49
     50Having an :UNSPECIFIC DEVICE when a PATHNAME refers to a file would
     51address problems when merging when the defaults contains a JAR-PATHNAME.
     52
     53### MERGE-PATHNAMES
     54http://www.lispworks.com/documentation/HyperSpec/Body/f_merge_.htm
     55
     56"If pathname explicitly specifies a host and not a device, and if the
     57host component of default-pathname matches the host component of
     58pathname, then the device is taken from the default-pathname;
     59otherwise the device will be the default file device for that host. If
     60pathname does not specify a host, device, directory, name, or type,
     61each such component is copied from default-pathname."
     62
     63This suggests that the contents HOST should be considered as an
     64additional axis of type for PATHNAME, so that when PATHNAMES of
     65differing types get merged, a DEVICE which has no meaning for a given
     66type does not get inserted.
    2667
    2768## Other implementations
    2869
    29 What is the "default" host for #p"/"?
     70A survey of the the "default" host for #p"/" on startup.
    3071
    3172### SBCL
     
    3980HOST is NIL.
    4081
    41 
    4282### CCL
    4383
    4484HOST is :UNSPECIFIC.
    45 
    4685
    4786### ECL
     
    4988HOST is NIL.
    5089
    51 ### Colophon
     90## Implementation
     91
     92### TRUENAME sets DEVICE to :UNSPECIFIC
     93
     94TRUENAME sets DEVICE to :UNSPECIFIC running on non-Windows when
     95resolving a path to a plain file.
     96
     97### Use an implicit type for merging
     98
     99In the case for which a merge occurs when DEFAULT-PATHNAME
     100is a JAR-PATHNAME and the following conditions hold:
     101
     1021.  HOST and DEVICE of the PATHNAME are NIL
     103
     1042.  The DIRECTORY of the PATHNAME represents an absolute path.
     105
     1063.  We are not on Windows.
     107
     108we set the DEVICE to be :UNSPECIFIC.
     109
     110### COLOPHON
    52111
    53112Mark <evenson@panix.com>
    54113Created:  01-SEP-2012
    55 Revised:  01-OCT-2012
     114Revised:  08-OCT-2012
    56115
Note: See TracChangeset for help on using the changeset viewer.