<div dir="ltr"><div><div>Scales were falling of my eyes as I was reading Drew's explanation. Thank you very much.<br><br></div>In my feeble defense, my expectations were based on CLISP, SBCL, and CCL's behavior (as pointed out by the follow-up email from Vibhu).<br><br></div>Mirko<br><div><div><div><div><br><div class="gmail_quote"><div dir="ltr">On Wed, Mar 1, 2017 at 11:25 AM Drew C <<a href="mailto:me@drewc.ca">me@drewc.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Hey, <div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg">On Wed, Mar 1, 2017 at 8:00 AM, Mirko Vukovic <span dir="ltr" class="gmail_msg"><<a href="mailto:mirko.vukovic@gmail.com" class="gmail_msg" target="_blank">mirko.vukovic@gmail.com</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div dir="ltr" class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg">Hello,<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"></div>This is with asdf 3.1.7.27,<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg">Armed Bear Common Lisp 1.4.0<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg">Java 1.6.0_41 Sun Microsystems Inc.<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg">OpenJDK 64-Bit Server VM,<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"></div>Emacs & Slime<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg">The following example code from the ASDF manual<br class="gmail_msg"></div></div></div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">The manual, <a href="https://common-lisp.net/project/asdf/asdf.html#The-defsystem-form" class="gmail_msg" target="_blank">https://common-lisp.net/project/asdf/asdf.html#The-defsystem-form</a>, just before the code, states : </div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><< Let’s look at a simple system. This is a complete file that should be saved as hello-lisp.asd (in order that ASDF can find it when ordered to operate on the system named "hello-lisp") >></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">This is important, as without a pathname where the system definition resides, how can it know where "packages.lisp" resides?</div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div dir="ltr" class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg">(asdf:defsystem "hello-lisp"<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"> :description "hello-lisp: a sample Lisp system."<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"> :version "0.0.1"<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"> :author "Joe User <<a href="mailto:joe@example.com" class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg" target="_blank">joe@example.com</a>>"<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"> :licence "Public Domain"<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"> :depends-on ("optima.ppcre" "command-line-arguments")<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"> :components ((:file "packages")<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"> (:file "macros" :depends-on ("packages"))<br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"> (:file "hello" :depends-on ("macros"))))<br class="gmail_msg"><br class="gmail_msg">when executed via the ABCL command line gives a relative path error<br class="gmail_msg"></div></div></div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">Because it is looking for #P"packages.lisp", but does not know where it resides. </div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Have a look at <a href="https://github.com/fare/asdf/blob/90502898375fe183d96cb03cd333d8b3ec09c0ba/parse-defsystem.lisp#L21" class="gmail_msg" target="_blank">https://github.com/fare/asdf/blob/90502898375fe183d96cb03cd333d8b3ec09c0ba/parse-defsystem.lisp#L21</a></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><div class="gmail_msg">;; The defsystem macro calls this function to determine the pathname of a system as follows:</div><div class="gmail_msg"> ;; 1. If the pathname argument is an pathname object (NOT a namestring),</div><div class="gmail_msg"> ;; that is already an absolute pathname, return it.</div><div class="gmail_msg"> ;; 2. Otherwise, the directory containing the LOAD-PATHNAME</div><div class="gmail_msg"> ;; is considered (as deduced from e.g. *LOAD-PATHNAME*), and</div><div class="gmail_msg"> ;; if it is indeed available and an absolute pathname, then</div><div class="gmail_msg"> ;; the PATHNAME argument is normalized to a relative pathname</div><div class="gmail_msg"> ;; as per PARSE-UNIX-NAMESTRING (with ENSURE-DIRECTORY T)</div><div class="gmail_msg"> ;; and merged into that DIRECTORY as per SUBPATHNAME.</div><div class="gmail_msg"> ;; Note: avoid *COMPILE-FILE-PATHNAME* because the .asd is loaded as source,</div><div class="gmail_msg"> ;; but may be from within the EVAL-WHEN of a file compilation.</div><div class="gmail_msg"> ;; If no absolute pathname was found, we return NIL.</div></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div dir="ltr" class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><br class="gmail_msg"> Invalid relative pathname #P"packages.lisp" for component ("hello-lisp" "packages")<br class="gmail_msg">Restarts:<br class="gmail_msg"> 0: RETRY Retry ASDF operation.<br class="gmail_msg"> 1: CLEAR-CONFIGURATION-AND-RETRY Retry ASDF operation after resetting the configuration.<br class="gmail_msg"> 2: TOP-LEVEL Return to top level.<br class="gmail_msg"><br class="gmail_msg"></div><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg">If that code is in a file, then the file compiles cleanly:<br class="gmail_msg"></div></div></div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">As it should. It now knows where the files are located, because you have it in the .asd file which is LOAD'ed. </div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"> </div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div dir="ltr" class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><br class="gmail_msg">CL-USER(6): (load (compile-file "test.asd"))<br class="gmail_msg">; Compiling /home/mv/projects/poi+excel/test.asd ...<br class="gmail_msg">; (IN-PACKAGE :CL-USER)<br class="gmail_msg">; (ASDF/PARSE-DEFSYSTEM:DEFSYSTEM "hello-lisp" ...)<br class="gmail_msg">; Wrote /home/mv/projects/poi+excel/test.abcl (0.021 seconds)<br class="gmail_msg">T<br class="gmail_msg">CL-USER(7): <br class="gmail_msg"><br class="gmail_msg"></div><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg">I am looking for confirmation of this and second opinions before taking up at the ASDF mailing list.<br class="gmail_msg"></div></div></div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">Confirmed, the second option is what should be used most of the time. Othewrwise, the source location (:pathname) can be used to tell it where the source code lies without it 'guessing'. Does that all make sense?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Cheers, </div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Drew Crampsie</div><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="gmail_msg"><div dir="ltr" class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><br class="gmail_msg"></div><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg">Thanks,<br class="gmail_msg"><br class="gmail_msg"></div><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg">Mirko<br class="gmail_msg"></div><div class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"><br class="gmail_msg"><br class="m_5310438781005268857gmail-m_-3969684068445940312gmail_msg gmail_msg"></div></div></div></div></div>
</blockquote></div><br class="gmail_msg"></div></div>
</blockquote></div></div></div></div></div></div>