On Wed, Aug 24, 2016 at 3:09 PM, Robert Goldman <rpgold...@sift.net> wrote: > 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") > > to > > (:INCLUDE construct #.(asdf:system-relative-pathname "foo" > "construct-source.lisp")) > > but: > > 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. > > suggestions? > Can UIOP:CURRENT-LISP-FILE-PATHNAME help you?
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org The demands that good people make are upon themselves; Those that bad people make are upon others. — Confucius (551–479 BC)