Relativising FASL Cache Paths

Nicolas Hafner shinmera at tymoon.eu
Fri Dec 15 09:41:30 UTC 2017


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 <https://portacle.github.io/>.
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
<https://github.com/portacle/config/blob/master/sbcl-init.lisp#L70>.
However, this sometimes leads to issues
<https://github.com/portacle/portacle/issues/62> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20171215/39c91e84/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20171215/39c91e84/attachment.sig>


More information about the asdf-devel mailing list