Hello everyone.
I have a rather particular problem that I have so far not been able to solve on my own without brittle workarounds. Specifically, I'm looking for a way to ensure that the directory paths stored in the FASL cache directory are, if possible, truncated according to some other path (by enough-pathname or a similar facility).
The reason I want this is for Portacle. The Portacle directory should be relocatable and you should even be able to take it with you on a flash drive to run on other machines. However, this usually means that the absolute position of the directory on the file system will change, even if the Lisp files and FASLs within it remain at the same relative locations.
I would thus like to stop ASDF from recompiling everything when the directory is moved absolutely, and instead rely on paths relative to Portacle's own "root" directory if possible.
My current approach involves setting asdf/output-translations::*output-translation-function* to a modified version that attempts to relativise the path as seen here. However, this sometimes leads to issues as the translated path might be relative and other components down the line seem to expect absolute paths.
Any advice on how to proceed on this would be appreciated.
Sincerely, Nicolas Hafner