Hi 宋文武. Thanks for your suggestions!

On Fri, 30 Sep 2016 19:45:18 +0800
iyzs...@member.fsf.org (宋文武) wrote:

> I'd like to suggest 2 changes:
> 
> - Name generic (source) packages with 'cl-...', and specified
> (compiled) packages with 'sbcl-...', 'ecl-...', etc.  Same with our
> python and perl packages, etc.
>

Ok.
   
> - Put the source-registry customization 'GUIX_SBCL_SOURCE_REGISTRY'
>   below the 'asdf/source-registry:default-user-source-registry' in
>   'asdf/source-registry:*default-source-registries*'.  IIUC, otherwise
>   CL systems installed from Guix will be prefered over user managed
>   systems by quicklisp or under ~/common-lisp, etc.
>

The main concern was that there was no way to add an empty string into
the configuration (all files have some directory pre-pended), and asdf
uses an empty string to specify the inherited configuration. This
would have meant any preceding configurations being ignored,
unfortunately.
 
> 
> Also, I find that ASDF already knowing the source systems well without
> any additional evironment variable.  Due to XDG_DATA_DIRS is honored
> by
> 
>   'asdf/source-registry:default-system-source-registry'
> 
> So, I think we can change this:
> --8<---------------cut here---------------start------------->8---
>     (defun default-system-source-registry ()
>     `(:source-registry
>       ,@(loop :for dir :in (xdg-data-dirs "common-lisp/")
>               :collect `(:directory (,dir "systems/"))
>               :collect `(:tree (,dir "source/")))
>       :inherit-configuration))
> --8<---------------cut here---------------end--------------->8---
> 
> To:
> --8<---------------cut here---------------start------------->8---
>     (defun default-system-source-registry ()
>     `(:source-registry
>       ,@(loop :for dir :in (xdg-data-dirs "common-lisp/")
>               :collect `(:directory (,dir "@LISP@-bundle-systems/")))
>               
>       ,@(loop :for dir :in (xdg-data-dirs "common-lisp/")
>               :collect `(:directory (,dir "systems/"))
>               :collect `(:tree (,dir "source/")))
>       :inherit-configuration))
> --8<---------------cut here---------------end--------------->8---
> 
> For the same effects.
>

I really like this idea. It will give system priority to
system-installed packages, as expected. I decided to do this and scrap
the other environment variables. Thanks!
 
> 
> Last, I guess the use of 'CL_SOURCE_REGISTRY' in asdf-build-system can
> be removed safely (for either way, with GUIX_SBCL_SOURCE_REGISTRY or
> XDG_DATA_DIRS).  Those environment variables should work in both the
> builder (concatenated from directories from inputs) and profile.
> 

This is now true; although the registry still needs to be set for the
system which is being compiled. I removed any inputs from being added
to that variable, as you suggest.

> 
> What do you think?

Thanks for the good ideas =). I made some other changes as well which
I'll describe in the updated patch-set.

--
Andy

Reply via email to