guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 04/13] utils: Use '@' for separating package names and versio


From: Alex Kost
Subject: Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
Date: Tue, 26 Jan 2016 02:33:21 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Mathieu Lirzin (2016-01-26 00:41 +0300) wrote:

> "Thompson, David" <address@hidden> writes:
>
>> Does the fact that so many files needed to be edited indicate the need
>> for a single specification string constructor?  If this had already
>> been the case, then this patch would have only needed to change 1 or 2
>> procedures.
>
> I don't know if such string constructor would help here.  My change log
> is maybe a bit misleading.  Most of the files changed are for
> documentation and tests which require inevitably to be updated manually
> for such interface change.
>
> Some noise is introduced because now the canonical package full name
> (with '@') is not a factor of the store file names anymore (which still
> uses '-').  Maybe there can be some improvements on this side?
>
> Finally, There is some code redundancy for the emacs UI but If I
> remember correctly there is a reason for that. (Alex?)

If there is redundancy in the code, it should be removed.  I didn't find
a procedure to make a name specification at the time, so I wrote
'make-package-specification' in "emacs/guix-main.scm".  I think we can
add a general procedure to construct a name specification to (guix
utils):

(define* (package-name-specification name #:optional version output)
  (let ((full-name (if version
                       (string-append name "@" version)
                       name)))
    (if output
        (string-append full-name ":" output)
        full-name)))

Then 'package-full-name' from (guix packages) and the code from
"emacs/guix-main.scm" can use it.  WDYT?

-- 
Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]