Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#584 load binds *load-pathname* incorrectly

closed-fixed
Sam Steingold
clisp (525)
5
2011-03-24
2011-01-25
Pascal Costanza
No

Here is a test case to illustrate the bug:

I have a file in /Users/costanza/Temp/test.lisp that contains the single line (print *load-pathname*).

Here is a session with clisp:

[1]> (setq custom:*parse-namestring-ansi* t)
T
[2]> (setf (logical-pathname-translations "temp")
'(("**;*.*.*" "/Users/costanza/Temp/**/*.*")))
((#P"TEMP:**;*.*.*" "/Users/costanza/Temp/**/*.*"))
[3]> (load #P"temp:test.lisp")
;; Loading file /Users/costanza/Temp/test.lisp ...
#P"/Users/costanza/Temp/test.lisp"
;; Loaded file /Users/costanza/Temp/test.lisp
T

The HyperSpec states that *load-pathname* is bound to the pathname denoted by the first argument to load, not to the translated physical pathname.

This seems to cause problems when trying to use ASDF 2 with logical pathnames.

Discussion

  • Sam Steingold
    Sam Steingold
    2011-03-24

    This bug report is now marked as "pending"/"works for me".
    This means that we think that we cannot reproduce the problem
    and cannot do anything about it.
    Unless you - the reporter - act within 2 weeks
    (e.g., by submitting a self-contained test case
    or answering our other recent requests),
    the bug will be permanently closed.
    Sorry about the inconvenience -
    we hope your silence means that
    you are no longer observing the problem either.

     
  • Sam Steingold
    Sam Steingold
    2011-03-24

    hg tip:
    (let (lp)
    (setf (logical-pathname-translations "FOO") '(("*" "./*")))
    (setq lp (logical-pathname "FOO:load-test"))
    (with-open-file (o lp :direction :output)
    (write-line "(defparameter *load-var* *load-pathname*)" o))
    (unwind-protect (list (equalp (truename lp) (load lp))
    (equalp (merge-pathnames lp) *load-var*))
    (delete-file lp)
    (setf (logical-pathname-translations "FOO") NIL)))
    ==> (T T)

     
  • Sam Steingold
    Sam Steingold
    2011-03-24

    • assigned_to: haible --> sds
    • status: open --> wont-fix-works-for-me
     
  • Sam Steingold
    Sam Steingold
    2011-03-24

    this was apparently fixed together with bug#3124200 on 2010-12-10

     
  • Sam Steingold
    Sam Steingold
    2011-03-24

    thank you for your bug report.
    the bug has been fixed in the source tree (mercurial/hg).
    you can either wait for the next release (recommended)
    or check out the current mercurial tree (see http://clisp.org\)
    and build CLISP from the sources (be advised that between
    releases the source tree is very unstable and may not even build
    on your platform).

     
  • Sam Steingold
    Sam Steingold
    2011-03-24

    • status: wont-fix-works-for-me --> closed-fixed