ASDF config file under Windows

Robert Goldman rpgoldman at sift.info
Sat Jun 3 15:27:33 UTC 2023


Dear Greg,

Thanks for the kind words!  I am not sure why I didn't see your post on 
ASDF-devel, but I didn't. And I have seen several requests for 
moderation, so the list seems live.  In case my response is interesting 
to the group, I am responding to the list as well.

A couple of disclaimers: (1) I haven't used Windows in more than a 
decade, and (2) I don't use these configuration files. I find I'm 
happier to keep all of my lisp configuration in lisp configuration files 
(`clinit.cl`, `.sbclrc`, etc. -- indeed I point all of those at one 
single `lisp-config.lisp` file), instead of having to hunt through 
multiple files in multiple locations for this information.  So take 
anything I say with more than a grain of salt (given your cardiologist 
approves!).

That said, these config files are placed according to the XDG standard 
which... as far as I can tell only applies to linux, and not to either 
Windows or MacOS. So there's code in ASDF/UIOP that extends XDG to other 
platforms.  ASDF documentation about XDG can be found 
[here](https://asdf.common-lisp.dev/asdf.html#XDG-base-directory).

I don't understand Windows enough to understand this piece of text from 
the ASDF manual:

> Since support for querying the Windows registry is not possible to do 
> in reasonable amounts of portable Common Lisp code, ASDF 3 relies on 
> the environment variables that Windows usually exports, and are 
> hopefully in synch with the Windows registry. If you care about the 
> details, see uiop/configuration.lisp and don’t hesitate to suggest 
> improvements.

The relevant code may be found in 
[uiop/configuration.lisp](https://gitlab.common-lisp.net/asdf/asdf/-/blob/release/uiop/configuration.lisp). 
  It looks like invoking the functions `uiop:xdg-config-home` and 
`uiop:xdg-config-pathnames` might help you figure out where ASDF is 
looking.  But I don't really understand the discussion about the 
registry above.  I do see a bit of code that says that UIOP (and thus 
ASDF) look for configs in the value of `(uiop:xdg-data-dirs "config/")` 
-- maybe see what that evaluates to on your Windows box?

I hope that these snippets have been helpful, and if you find the 
answers you seek, please send to me and ASDF-devel, so that the 
information will be available to others.

It might be a good thing if someone with the resources would gift a 
Windows resource to the CL Foundation to hook into `common-lisp.net` so 
that the community doesn't have to rely on this kind of guesswork.  I 
note that ASDF is no longer tested on Windows at all, since I don't have 
access to a Windows VM and even if I did, I wouldn't know how to use it 
(nor do I have the time to learn).

Good luck!
R





On 2 Jun 2023, at 19:40, Greg Bennett wrote:

> Good evening Robert,
>
> Some longish time ago you were kind enough to help me with ASDF 
> matters.
> I posted recently to asdf-devel, largely in the hope that you might 
> see it, I confess.
>
> Web search has, so far, not been helpful, I'm afraid.
>
> I shall quite understand if you do not reply; your inbox must receive 
> lots of this sort of thing.
>
> I have a test system in c:/ASDF/asdf-tests/ copied from the linux 
> directory /home/gwbennett/ASDF/asdf-tests/
>
> Under Linux in my source-registry.conf.d directory I have the file 
> gb-source.conf
> with the one line (:tree "/home/gwbennett/ASDF/asdf-tests/")
>
> Then in sbcl I can issue (asdf:load-system "gb-a") and all is well.
>
> I have tried various spots for gb-source.conf under Windows, all 
> without success:
>
> c:\Users\Greg\AppData\Local\config\common-lisp\source-registry.conf.d\
>
> c:\Users\Greg\
>
> c:\Users\Greg\AppData\
>
> c:\Users\Greg\AppData\Local\
>
> If I issue, old style,  (push "c:/ASDF/asdf-tests/" 
> asdf:*central-registry*) then all is well.
>
> Perhaps there is no place for a config file under W!
>
> Cheers
>
> Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20230603/fe43dea3/attachment.html>


More information about the asdf-devel mailing list