[asdf-devel] How to specify to ASDF to load system from current directory?
rpgoldman at sift.net
Thu Nov 7 01:53:00 UTC 2013
> —♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
> On Wed, Nov 6, 2013 at 3:00 PM, Robert Goldman <rpgoldman at sift.net> wrote:
>> Faré wrote:
>>> I disrecommend pushing '*default-pathname-defaults* into the
>>> *central-registry* — that makes system loading less predictable,
>>> depending on the binding of this variable.
>>> Instead, I recommend pushing an actual pathname object (that may
>>> happen to be the current value of *d-p-d* or of (uiop:getcwd), if you
>>> insist), so that the value remains well-defined in the face of
>>> rebinding of the variable.
>>> Or better, edit your ~/.config/common-lisp/source-registry.conf and
>>> register your software there. Or for temporary stuff, export a
>>> CL_SOURCE_REGISTRY, or call asdf:initialize-source-registry with a
>> So something like
>> (DEFUN ADD-SOURCE-DIRECTORY-TO-ASDF (DIR)
>> (ASDF:INITIALIZE-SOURCE-REGISTRY `(:source-registry (:DIRECTORY ,DIR) :inherit-configuration)))
>> (ADD-SOURCE-DIRECTORY-TO-ASDF (uiop:getcwd))
> This doesn't *add* the directory to the configuration, but each time
> overwrites the previous configuration to use this directory, then the
> rest of the normal configuration from environment variables,
> configuration files, defaults, etc.
Ah. I see that I didn't understand the semantics of :INHERIT-CONFIGURATION. I thought it inherited the *current* configuration, but if I understand your response above, :INHERIT-CONFIGURATION means something more like "recompute the configuration based on the standard configuration inputs (and add anything newly specified)."
The other alternatives (rewrite your source-registry.conf, reset the environment variables, etc.) all seem to involve smashing one's lisp session and restarting. For an old school person like me, who treats his lisp session like his emacs session, and almost like his reboot cycle, this is somewhat unfortunate. Altering ASDF::*central-registry* doesn't have this same (to me) drawback....
More information about the asdf-devel