Robert Goldman rpgoldman at sift.net
Wed Aug 24 19:09:58 UTC 2016

I just realized that ASDF somewhat breaks *LOAD-TRUENAME*.

I had some code in a DSL that has an :INCLUDE construct, and that DSL is
being interpreted at load-time.

The :INCLUDE directive tries to find other lisp files relative to the
current file (the source file that contained the DSL :INCLUDE expression).

Now, if we were not using ASDF, I would be able to find those files by
merging a name with *load-truename* (and this is how things used to work).

But ASDF's relocation of the fasls breaks this.

Now, of course, I could change

(:INCLUDE construct "construct-source.lisp")


(:INCLUDE construct #.(asdf:system-relative-pathname "foo"


1. This is blatantly ugly, effortful, and error-prone for the programmer.

2. It is poor software engineering, because it requires the contained
thing (the DSL expression) to "know" that it is being included in a very
specific ASDF system.  Now if we rename the ASDF system, or shuffle
files, our DSL code is broken, and that's just wrong, because it makes
the abstraction upside down.

I somehow assumed it would be possible to go from the FASL to the
source, but I don't actually see any obvious way to do this.



More information about the asdf-devel mailing list