<span class="iD"> </span><span class="iD"> </span>Hi,<br><br><div class="gmail_quote">On Fri, Oct 30, 2009 at 10:57 PM, Attila Lendvai <span dir="ltr"><<a href="mailto:attila.lendvai@gmail.com">attila.lendvai@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
> * When LOAD-ing local-time (not via ASDF) while ASDF is incidentally<br>
> loaded into the image, local-time will try to locate the ASDF package path<br>
> anyway, ignoring *load-pathname*. The result may be NIL, yielding an error<br>
> in constructing the pathname.<br>
<br>
<br>
</div><br>
fixed<br></blockquote><div> <br>Works for me.<br>
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
> * When LOAD-ing local-time (not via ASDF) while there is no ASDF in the<br>
> image, *project-home-directory* will default to the directory of<br>
> *load-pathname*, which in the current source tree layout is src/ -- whereas<br>
> the repository is under src/../ -- eventually causing an error in TRUENAME.<br>
<br>
<br>
</div>fixed<br></blockquote><div><br>Works for me.<br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
> * In a saved image that includes local-time (via ASDF) and ASDF itself,<br>
> the value of *project-home-directory* may be set at the time of saving.[1]<br>
> If the image is deployed in a different environment, it may not find the<br>
> repository, eventually causing an error in TRUENAME.<br>
<br>
<br>
</div>that's the usual issue which needs to be taken care of the one who<br>
saves the image. if static timezone files are ok, then read them<br>
before saving. if they are not, then no smartness is enough to handle<br>
the issue without the saver's help.<br></blockquote><div><br>Okay, but maybe local-time can handle the case more consistently. See below about conditions.<br><br><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
> * In a saved image that includes local-time but excludes ASDF, the package<br>
> path cannot be found, and *load-pathname* may be NIL.[2] This yields an<br>
> error in constructing the pathname, before the client has a chance to do<br>
> anything about it.<br>
<br>
<br>
</div>should be fixed
<br></blockquote><div> <br>Still a problem in ECL since (or
*compile-file-truename* *load-truename*) => NIL. Merging "../"
fails before the client gets control. This works:<br><br>diff -rN old-local-time/src/local-time.lisp new-local-time/src/local-time.lisp<br>
201c201<br>
< (try (merge-pathnames "../" path)))<br>
---<br>
> (when path (try (merge-pathnames "../" path))))<br>
<br>
<br>Is the noisy warning necessary? In ECL, it writes to stderr just
before the client code runs. In a saved executable, it is expected
that the directory might not be found at boot, so the warning is not
useful there. Muffling the warning from the client side could be
unnecessarily complicated (I'm not sure if it is even possible), or
might affect other unexpected warnings or stderr messages. In SBCL,
the saved path is not checked at boot, and no warning is raised -- which is inconsistent with
the behaviour in ECL.<br>
<br>
I would prefer instead a condition/error to be generated when an
invalid project home directory is used, with a descriptive report.
Signalling late in the program should make local-time's behaviour more
consistent and predictable. (It would even help in the case of an
interactive session -- suppose something in the filesystem changes
after the parameter is initialized.)<br>
<br>
Attached is a patch demonstrating one kind of condition scheme. Is something like this viable?<br>
</div><div><br>Thanks! <br><br></div></div>-- <br>Abhishek Reddy<br><a href="http://abhishek.geek.nz">http://abhishek.geek.nz</a><br>