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: Mathieu Lirzin
Subject: Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
Date: Fri, 19 Feb 2016 21:49:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Mathieu Lirzin <address@hidden> skribis:
>
>> From 7fef43249b704db3c4d511b2f1b62428740cfa73 Mon Sep 17 00:00:00 2001
>> From: Mathieu Lirzin <address@hidden>
>> Date: Sun, 24 Jan 2016 01:54:44 +0100
>> Subject: [PATCH] utils: Use '@' for separating package names and version
>>  numbers.
>>
> [...]
>>  (define (package-name->name+version name)
>> -  "Given NAME, a package name like \"foo-0.9.1b\", return two values:
>> -\"foo\" and \"0.9.1b\".  When the version part is unavailable, NAME and
>> -#f are returned.  The first hyphen followed by a digit is considered to
>> -introduce the version part."
>> +  "Given NAME, a package name like \"address@hidden", return two values: 
>> \"foo\"
>> +and \"0.9.1b\".  When the version part is unavailable, NAME and #f are
>> +returned.  Both parts must not contain any '@'."
>
> I think this one should remain unchanged, first because it triggers a
> full rebuild ;-), and second because it has uses in
> {emacs,gnu}-build-system that expect exactly these semantics.
>
> So I think we have to simply provide a different version of that in
> (guix utils) or so.
>
> Also, I think that at least for some time, the new
> ‘package-name->name+version’ (maybe we could call it
> ‘package-specification->name+version’ for consistency) should fall back
> to the old method when:
>
>   1. The spec has no @ sign, and
>
>   2. The specified package name was not found.
>
>
> It could print a warning when the old method has been used *and* a
> matching package was found, explaining that this is deprecated syntax.
>
> WDYT?

I have finally took some time to look into this, and actually
implementing ‘package-specification->name+version’ in (guix utils) with
the suggested fall back feature seems not desirable since checking for
package existence would require using the procedure
‘find-packages-by-name’ from (gnu packages) which will then create a
circular dependency.  Did I miss something?

--
Mathieu Lirzin



reply via email to

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