On Sun, 2024-11-24 at 14:09, Robert Goldman rpgoldman@sift.info wrote:
I haven't verified the details, but I believe the short answer to your question is "yes."
What one would need to do is to find where packages such as `cl-alexandria-sbcl` write their compiled code and add that location to the exceptions to output translations.
See [the asdf manual](https://asdf.common-lisp.dev/asdf.html#Controlling-where-ASDF-saves-compiled...), and particularly look at the definition of the configuration DSL.
This may require the user to appropriately employ `:inherit-configuration` in any user-specific configuration they do, but in general it's not a good idea to `:ignore-inherited-configuration` unless you have a very good reason.
Best, R
Robert P. Goldman Research Fellow Smart Information Flow Technologies (d/b/a SIFT, LLC)
Hello Robert,
Thank you for your response.
We loop over the locations where compiled code is stored to build the output translations, as shown in the code below.
(defvar *freebsd-output-translations* ()) (pushnew :inherit-configuration *freebsd-output-translations*) (dolist (path (directory "/usr/local/lib/common-lisp/*/")) (unless (and (pathnamep path) (search *system-registry* (namestring path) :start1 0 :end1 (length *system-registry*))) (let ((source (make-pathname :directory (append (pathname-directory path) (list :wild-inferiors)))) (target (make-pathname :directory (append (pathname-directory path) (list (lisp-specific-fasl-subdir) :wild-inferiors))))) (pushnew (list source target) *freebsd-output-translations*)))) (asdf:initialize-output-translations (cons :output-translations *freebsd-output-translations*))
The files in our CL OS packages are stored under /usr/local/lib/common-lisp/<project>/. The FASL packages put compiled code in directories unique to each lisp implementation such as /usr/local/lib/common-lib/<project>/sbclfasl, /usr/local/lib/common-lisp/<package_name>/cclfasl/, and so on.
Before the call to asdf:initialize-output-translations, *freebsd-output-translations* looks correct (if I'm understanding the DSL format):
(:OUTPUT-TRANSLATIONS (#P"/usr/local/lib/common-lisp/gpgme/**/" #P"/usr/local/lib/common-lisp/gpgme/sbclfasl/**/") (#P"/usr/local/lib/common-lisp/asdf/**/" #P"/usr/local/lib/common-lisp/asdf/sbclfasl/**/") (#P"/usr/local/lib/common-lisp/alexandria/**/" #P"/usr/local/lib/common-lisp/alexandria/sbclfasl/**/") :INHERIT-CONFIGURATION)
The part that I'm still missing is how to add locations to the exceptions to output translations.
Kind regards, Joe
P.S. After the call to asdf:initialize-output-translations, dumping asdf::*output-translations* gives:
(((#P"/usr/local/lib/common-lisp/gpgme/sbclfasl/**/" T) (#P"/usr/local/lib/common-lisp/asdf/sbclfasl/**/" T) (#P"/usr/local/lib/common-lisp/alexandria/sbclfasl/**/" T) (#P"/usr/home/jrm/.cache/common-lisp/sbcl-2.4.10-bsd-x64-s/**/*.*" T) (#P"/usr/local/lib/common-lisp/gpgme/**/" #P"/usr/local/lib/common-lisp/gpgme/sbclfasl/**/") (#P"/usr/local/lib/common-lisp/asdf/**/" #P"/usr/local/lib/common-lisp/asdf/sbclfasl/**/") (#P"/usr/local/lib/common-lisp/alexandria/**/" #P"/usr/local/lib/common-lisp/alexandria/sbclfasl/**/") (#P"/home/jrm/.cache/common-lisp/my-dir/**/*.*" T) (#P"/usr/local/lib/sbcl/**/*.*" T) (#P"/**/*.*" #P"/home/jrm/.cache/common-lisp/my-dir/**/*.*") (T #P"/usr/home/jrm/.cache/common-lisp/sbcl-2.4.10-bsd-x64-s/**/*.*")))