Changeset 14172
- Timestamp:
- 10/08/12 18:07:00 (8 years ago)
- 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 3 We wish to resolve the following issues. 2 4 3 5 ## UC0 Loading jna.jar for CFFI via Quicklisp 4 6 5 This happens in loading systems via ASDF recursively in jars (abcl-contrib.jar) 7 This happens in loading systems via ASDF recursively in jars, most 8 importantly for those packaged in 'abcl-contrib.jar', which prevents 9 CFFI from loading the necessary JNA code. 6 10 7 ## UC1 8 If *DEFAULT-PATHNAME-DEFAULTS* is a JAR-PATHNAME, commands like 11 ## UC1.1 12 If *DEFAULT-PATHNAME-DEFAULTS* is a JAR-PATHNAME, commands that would 13 normally be expected to work such as 9 14 10 CL-USER : (probe-file #"/")15 CL-USER> (probe-file #p"/") 11 16 12 17 will fail. 13 18 19 ### UC1.2 14 20 15 ## Questions 21 If *DEFAULT-PATHNAME-DEFAULTS* is a JAR-PATHNAME, COMPILE-FILE 22 operations specifying an OUTPUT-FILE with a NIL DEVICE will fail, as 23 COMPILE-FILE-PATHNAME is required to merge its arguments with the 24 defaults. 25 26 ## CLHS Citations 27 28 Some especially relevant portions of the CLHS for consideration. 16 29 17 30 ### 19.2.3 Merging Pathnames 31 http://www.lispworks.com/documentation/HyperSpec/Body/19_bc.htm 18 32 19 Except as explicitly specified otherwise, for functions that33 "Except as explicitly specified otherwise, for functions that 20 34 manipulate or inquire about files in the file system, the pathname 21 35 argument to such a function is merged with *default-pathname-defaults* 22 before accessing the file system (as if by merge-pathnames). 36 before accessing the file system (as if by merge-pathnames)." 23 37 24 Q: Does this mean that the arguments to PARSE-NAMESTRING should not be 25 merged? 38 Note that this implies that the arguments to PARSE-NAMESTRING--which 39 is what the SHARSIGN-P reader macro correpsponds to--should not be 40 merged. 41 42 43 ## 19.2.2.2.3 :UNSPECIFIC as a Component Value 44 http://www.lispworks.com/documentation/HyperSpec/Body/19_bbbc.htm 45 46 "If :unspecific is the value of a pathname component, the component is 47 considered to be ``absent'' or to ``have no meaning'' in the filename 48 being represented by the pathname." 49 50 Having an :UNSPECIFIC DEVICE when a PATHNAME refers to a file would 51 address problems when merging when the defaults contains a JAR-PATHNAME. 52 53 ### MERGE-PATHNAMES 54 http://www.lispworks.com/documentation/HyperSpec/Body/f_merge_.htm 55 56 "If pathname explicitly specifies a host and not a device, and if the 57 host component of default-pathname matches the host component of 58 pathname, then the device is taken from the default-pathname; 59 otherwise the device will be the default file device for that host. If 60 pathname does not specify a host, device, directory, name, or type, 61 each such component is copied from default-pathname." 62 63 This suggests that the contents HOST should be considered as an 64 additional axis of type for PATHNAME, so that when PATHNAMES of 65 differing types get merged, a DEVICE which has no meaning for a given 66 type does not get inserted. 26 67 27 68 ## Other implementations 28 69 29 What is the "default" host for #p"/"? 70 A survey of the the "default" host for #p"/" on startup. 30 71 31 72 ### SBCL … … 39 80 HOST is NIL. 40 81 41 42 82 ### CCL 43 83 44 84 HOST is :UNSPECIFIC. 45 46 85 47 86 ### ECL … … 49 88 HOST is NIL. 50 89 51 ### Colophon 90 ## Implementation 91 92 ### TRUENAME sets DEVICE to :UNSPECIFIC 93 94 TRUENAME sets DEVICE to :UNSPECIFIC running on non-Windows when 95 resolving a path to a plain file. 96 97 ### Use an implicit type for merging 98 99 In the case for which a merge occurs when DEFAULT-PATHNAME 100 is a JAR-PATHNAME and the following conditions hold: 101 102 1. HOST and DEVICE of the PATHNAME are NIL 103 104 2. The DIRECTORY of the PATHNAME represents an absolute path. 105 106 3. We are not on Windows. 107 108 we set the DEVICE to be :UNSPECIFIC. 109 110 ### COLOPHON 52 111 53 112 Mark <evenson@panix.com> 54 113 Created: 01-SEP-2012 55 Revised: 0 1-OCT-2012114 Revised: 08-OCT-2012 56 115
Note: See TracChangeset
for help on using the changeset viewer.