portacle icon indicating copy to clipboard operation
portacle copied to clipboard

Wrong source path when debugging

Open metayan opened this issue 7 years ago • 5 comments

Trying to visit source file directly from the debugger call stack with 'v' gives Error: Failed to find the TRUENAME of /Users/linus/portacle/build/asdf/build/asdf.lisp: No such file or directory

Using OSX 10.11.6, after fresh portacle-update. Triggered by (ql:quickload :gsll)

metayan avatar Dec 15 '17 07:12 metayan

Looks like SBCL bakes in the absolute path of the source info when compiling a FASL or something.

I'll have to see if there's a way to relocate that.

Shinmera avatar Dec 15 '17 08:12 Shinmera

Yes, it seems like that.

(compile-file #P"/Applications/portacle/mac/asdf/asdf.lisp") solved it. Now it's correctly found.

Maybe logical-pathname-translations could be tweaked to correctly find the sources to the FASLs that are precompiled on your system – without having to recompile them locally?

Currently:

(logical-pathname-translations "SYS")
(("SYS:SRC;**;*.*.*" #P"/Applications/portacle/mac/sbcl/share/src/src/**/*.*")
 ("SYS:CONTRIB;**;*.*.*" #P"/Applications/portacle/mac/sbcl/share/src/contrib/**/*.*")
 ("SYS:OUTPUT;**;*.*.*" #P"/Applications/portacle/mac/sbcl/share/src/output/**/*.*"))

metayan avatar Dec 15 '17 08:12 metayan

I don't think the source paths in FASLs are stored as logical pathnames.

Shinmera avatar Dec 15 '17 08:12 Shinmera

Header of the original mac/sbcl/lib/sbcl/contrib/uiop.fasl (compiled on your system):

#!/Users/linus/portacle/build/sbcl/src/runtime/sbcl --script
# FASL
  compiled from "SYS:CONTRIB;ASDF;UIOP.LISP.NEWEST"
  using SBCL version 1.3.17

After recompiling the asdf.lisp above, I don't have the original value anymore, but now it's

#!/Applications/portacle//mac/sbcl/bin/sbcl --script
# FASL
  compiled from "/Applications/portacle/mac/asdf/asdf.lisp"
  using SBCL version 1.3.17

so it lost the logical pathname.

metayan avatar Dec 15 '17 08:12 metayan

Also, found mac/sbcl/lib/sbcl/contrib/asdf.fasl

The mac/asdf/asdf.fasl from the original .dmg has

#!/Users/linus/portacle//mac/sbcl/bin/sbcl --script
# FASL
  compiled from "asdf.lisp"
  using SBCL version 1.3.17

metayan avatar Dec 15 '17 08:12 metayan