Commit 059c40b9 authored by Robert P. Goldman's avatar Robert P. Goldman
Browse files

Fixed pathname limitations slides.

parent c59ee8f5
......@@ -13,7 +13,7 @@
** DONE Center institutions under authors
** DONE Finish "Future Directions"
[[*Future directions]]
** TODO Fix "Pathname limitations" slide
** DONE Fix "Pathname limitations" slide
*** Needs structure
*** Table? Something to make the before and after stand out
*** Add the missing trailing slash in module pathnames to the slide...
......@@ -183,43 +183,83 @@ sub-bullet under a major header.
* Pathname limitations
** Pathname Limitations
** Pathname FAILs
*** *Core idea:* #p"foo/bar" can never be portable. "foo/bar" can be.
*** CL pathname FAIL: underspecified semantics means not portably usable
*** (:file "foo") ==> #p"foo.lisp"
*** CL pathname FAIL: host and device are inherited through merge pathnames
*** (:file "foo.bar") ==> before: #p"foo.bar" ASDF2: #p"foo.bar.lisp"
*** CL pathname solution: provide a portable *abstraction*:
*** (:file "foo-V1.2") ==> before: #p"foo-V1.2" ASDF2: #p"foo-V1.2.lisp"
**** "relative pathnames with optionally specified type"
*** (:file "foo/bar") ==> before: non portable ASDF2: #p"foo/bar.lisp"
*** ASDF FAIL: it was hard to get it actually right
**** (:file "foo-bar" :pathname #.(merge-pathnames (make-pathname :name "bar" :directory '(:relative "foo") :type "lisp" :defaults \*load-truename\*) \*load-truename\*))
**** Solution: make it hard for the user to get it wrong
*** (:static-file "README") ==> #p"README"
*** ASDF FAIL: it was hard to know you were wrong
*** (:file "README" :pathname #p"README") ==> before: #p"README.lisp" ASDF2: #p"README"
**** Solution: better fail early for everyone than pass as working for some
** Pathname fixes
*** ASDF2 is much better, but still trips users
*** CL pathname FAIL: underspecified semantics means not portably usable
**** Solution: keep improving code, error cases, documentation.
**** Solution: provide a portable *abstraction*
***** parse strings into "relative pathnames with optionally specified type"
** Fixing the FAILs
*** ASDF FAIL: it was hard to get it actually right
*** *Change*: More predictable addition of types
\begin{tabular}{l|l|l}
Input & ASDF 1 & ASDF 2 \\ \hline
\texttt{(:file "foo")} & \texttt{\#p"foo.lisp"} & \texttt{\#p"foo.lisp"} \\
\texttt{(:file "foo.bar")} & \texttt{\#p"foo.bar"} & \texttt{\#p"foo.bar.lisp"} \\
\texttt{(:file "foo-V1.2")} & \texttt{\#p"foo-V1.2"} & \texttt{\#p"foo-V1.2.lisp"} \\
\texttt{(:static-file "FOO")} & \texttt{\#p"FOO"} & \texttt{\#p"FOO"} \\
% \texttt{(:file "README" :pathname \#p"README")} & \texttt{\#p"README.lisp"} & \texttt{\#p"README"}
\end{tabular}
**** Solution: make it hard for the user to get it wrong
** Fixing the FAILs
*** ASDF FAIL: it was hard to know you were wrong
*** *The FAIL:* #p"foo/bar" can never be portable.
**** Solution: better fail early for everyone than pass as working for some
*** *The fix:* "foo/bar" can be.
**** Parse strings as "relative pathnames with optionally specified type"
*** You would think this would work:
\small
\begin{verbatim}
(:file "foo-bar" :pathname #p"foo/bar.lisp")
\end{verbatim}
*** Really working but horrible old solution:
\small
\begin{verbatim}
(:file "foo-bar" :pathname
#.(merge-pathnames
(make-pathname
:name "bar" :directory '(:relative "foo")
:type "lisp" :defaults *load-truename*)
*load-truename*))
\end{verbatim}
*** New solution: =(:file "foo/bar")=
** Fixing the FAILs
*** *The FAIL:* Inherit inappropriate values of host and directory
**** Windows (and obscure old file systems)
**** Logical pathnames
*** *Core idea:* Replace =MERGE-PATHNAMES=
*** *Change*: "relative pathnames" don't override host or device.
*** *The FAIL:* Easy to get module pathname spec wrong
*** *Core idea 3:* Intelligently interpret pathnames
**** *Before:* =(:module "foo" :pathname "bar" ....)= might look in "bar/" or in parent, depending on implementation
**** *After:* Always look in "bar/"
*** ASDF2 is much better, but still trips users
**** Solution: keep improving code, error cases, documentation.
** Configuration Difficulties
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment