From xach at xach.com Mon Jun 13 19:51:22 2011 From: xach at xach.com (Zach Beane) Date: Mon, 13 Jun 2011 15:51:22 -0400 Subject: [closure-devel] Use of (make-pathname ... :type :unspecific) Message-ID: <87boy17bnp.fsf@hangup.portland.xach.com> In src/parse/html-parser.lisp, there's this form: (make-pathname :directory '(:relative "resources") :type :unspecific) 19.2.2.2.3 says this: Whether a value of :unspecific is permitted for any component on any given file system accessible to the implementation is implementation-defined. A conforming program must never unconditionally use a :unspecific as the value of a pathname component because such a value is not guaranteed to be permissible in all implementations. CLISP signals an error on the form. What's the :type :unspecific for? It seems to work on CLISP (and all other implementations I tried) without it; is it a precaution against a *default-pathname-defaults* that apparently has a value for :type? Zach From david at lichteblau.com Mon Jun 13 20:18:18 2011 From: david at lichteblau.com (David Lichteblau) Date: Mon, 13 Jun 2011 22:18:18 +0200 Subject: [closure-devel] Use of (make-pathname ... :type :unspecific) In-Reply-To: <87boy17bnp.fsf@hangup.portland.xach.com> References: <87boy17bnp.fsf@hangup.portland.xach.com> Message-ID: <20110613201818.GE7188@radon> Quoting Zach Beane (xach at xach.com): [...] > What's the :type :unspecific for? It seems to work on CLISP (and all > other implementations I tried) without it; is it a precaution against a > *default-pathname-defaults* that apparently has a value for :type? I don't know. Here's the snippet from the patch submitter, can you make sense of it? Perhaps only very old asdf2 has this problem? * Slava Gorbunov wrote on 20 Sep 2010: | And, finally, here is patch which makes possible to load closure-html | with asdf2 (included in recent versions of SBCL, for example): | | --- a/src/parse/html-parser.lisp | +++ b/src/parse/html-parser.lisp | @@ -34,7 +34,7 @@ | (defparameter sgml::*simple-catalog* | (let ((base | (merge-pathnames | - "resources/" | + (make-pathname :directory '(:relative "resources") :type :unspecific) | (asdf:component-relative-pathname | (asdf:find-system :closure-html))))) | (loop | | asdf:component-relative-pathname in ASDF2 returns pathname with .asd | extension appended, so open-public-resource tries to open files with | .asd extension appended, too, and, obviously, fails. d. From xach at xach.com Mon Jun 13 21:59:30 2011 From: xach at xach.com (Zach Beane) Date: Mon, 13 Jun 2011 17:59:30 -0400 Subject: [closure-devel] Use of (make-pathname ... :type :unspecific) In-Reply-To: <20110613201818.GE7188@radon> (David Lichteblau's message of "Mon, 13 Jun 2011 22:18:18 +0200") References: <87boy17bnp.fsf@hangup.portland.xach.com> <20110613201818.GE7188@radon> Message-ID: <877h8p75q5.fsf@hangup.portland.xach.com> David Lichteblau writes: > Quoting Zach Beane (xach at xach.com): > [...] >> What's the :type :unspecific for? It seems to work on CLISP (and all >> other implementations I tried) without it; is it a precaution against a >> *default-pathname-defaults* that apparently has a value for :type? > > I don't know. Here's the snippet from the patch submitter, can you make > sense of it? Perhaps only very old asdf2 has this problem? Yes, that looks like it's the case to me. ASDF2 no longer behaves like he describes. Zach > * Slava Gorbunov wrote on 20 Sep 2010: > | And, finally, here is patch which makes possible to load closure-html > | with asdf2 (included in recent versions of SBCL, for example): > | > | --- a/src/parse/html-parser.lisp > | +++ b/src/parse/html-parser.lisp > | @@ -34,7 +34,7 @@ > | (defparameter sgml::*simple-catalog* > | (let ((base > | (merge-pathnames > | - "resources/" > | + (make-pathname :directory '(:relative "resources") :type :unspecific) > | (asdf:component-relative-pathname > | (asdf:find-system :closure-html))))) > | (loop > | > | asdf:component-relative-pathname in ASDF2 returns pathname with .asd > | extension appended, so open-public-resource tries to open files with > | .asd extension appended, too, and, obviously, fails. > > > d. From david at lichteblau.com Tue Jun 14 14:26:13 2011 From: david at lichteblau.com (David Lichteblau) Date: Tue, 14 Jun 2011 16:26:13 +0200 Subject: [closure-devel] Use of (make-pathname ... :type :unspecific) In-Reply-To: <877h8p75q5.fsf@hangup.portland.xach.com> References: <87boy17bnp.fsf@hangup.portland.xach.com> <20110613201818.GE7188@radon> <877h8p75q5.fsf@hangup.portland.xach.com> Message-ID: <20110614142613.GF7188@radon> Quoting Zach Beane (xach at xach.com): > David Lichteblau writes: > > > Quoting Zach Beane (xach at xach.com): > > [...] > >> What's the :type :unspecific for? It seems to work on CLISP (and all > >> other implementations I tried) without it; is it a precaution against a > >> *default-pathname-defaults* that apparently has a value for :type? > > > > I don't know. Here's the snippet from the patch submitter, can you make > > sense of it? Perhaps only very old asdf2 has this problem? > > Yes, that looks like it's the case to me. ASDF2 no longer behaves like > he describes. Does this change work for you on clisp? --- a/src/parse/html-parser.lisp +++ b/src/parse/html-parser.lisp @@ -33,10 +33,13 @@ (defparameter sgml::*simple-catalog* (let ((base - (merge-pathnames - (make-pathname :directory '(:relative "resources") :type :unspecific) - (asdf:component-relative-pathname - (asdf:find-system :closure-html))))) + (make-pathname + :name nil + :type nil + :defaults (merge-pathnames + "resources/" + (asdf:component-relative-pathname + (asdf:find-system :closure-html)))))) (loop :for (name . filename) :in '(("-//W3O//DTD W3 HTML 3.0//EN" . "dtd/HTML-3.0") From xach at xach.com Tue Jun 14 14:29:04 2011 From: xach at xach.com (Zach Beane) Date: Tue, 14 Jun 2011 10:29:04 -0400 Subject: [closure-devel] Use of (make-pathname ... :type :unspecific) In-Reply-To: <20110614142613.GF7188@radon> (David Lichteblau's message of "Tue, 14 Jun 2011 16:26:13 +0200") References: <87boy17bnp.fsf@hangup.portland.xach.com> <20110613201818.GE7188@radon> <877h8p75q5.fsf@hangup.portland.xach.com> <20110614142613.GF7188@radon> Message-ID: <87pqmg4hcf.fsf@hangup.portland.xach.com> David Lichteblau writes: > Quoting Zach Beane (xach at xach.com): >> David Lichteblau writes: >> >> > Quoting Zach Beane (xach at xach.com): >> > [...] >> >> What's the :type :unspecific for? It seems to work on CLISP (and all >> >> other implementations I tried) without it; is it a precaution against a >> >> *default-pathname-defaults* that apparently has a value for :type? >> > >> > I don't know. Here's the snippet from the patch submitter, can you make >> > sense of it? Perhaps only very old asdf2 has this problem? >> >> Yes, that looks like it's the case to me. ASDF2 no longer behaves like >> he describes. > > Does this change work for you on clisp? > [snip] CLISP compiles it without complaint with that change. Zach From xach at xach.com Tue Jun 14 15:28:03 2011 From: xach at xach.com (Zach Beane) Date: Tue, 14 Jun 2011 11:28:03 -0400 Subject: [closure-devel] Use of (make-pathname ... :type :unspecific) In-Reply-To: <20110614142613.GF7188@radon> (David Lichteblau's message of "Tue, 14 Jun 2011 16:26:13 +0200") References: <87boy17bnp.fsf@hangup.portland.xach.com> <20110613201818.GE7188@radon> <877h8p75q5.fsf@hangup.portland.xach.com> <20110614142613.GF7188@radon> Message-ID: <87hb7s4em4.fsf@hangup.portland.xach.com> Thanks for committing the update. An unrelated update introduces an implicit dependency on CXML by way of CXML::VALID-NAME-P; I get "No package named CXML" as an error now unless CXML is coincidentally already loaded. Zach