unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mathieu Lirzin <mthl@gnu.org>
Cc: guix-devel@gnu.org, Alex Kost <alezost@gmail.com>
Subject: Re: [PATCH 04/13] utils: Use '@' for separating package names and version numbers.
Date: Mon, 29 Feb 2016 17:00:53 +0100	[thread overview]
Message-ID: <87ziujecay.fsf@gnu.org> (raw)
In-Reply-To: <87wppo1hso.fsf@gnu.org> (Mathieu Lirzin's message of "Mon, 29 Feb 2016 01:28:23 +0100")

Mathieu Lirzin <mthl@gnu.org> skribis:

> However, I am not pleased by the current state of the
> ‘specification/package-name->...’ procedures.  They don't compose well,
> and are obfuscated by being fragmented across a bunch of modules.  I
> don't know if there is much room for improvement but my feeling is that
> the brain involvement required for implementing the '@' thing was far
> too high compared to the actual task.

The idea is that things that need to traverse the list of packages live
in (gnu packages), whereas syntactic helpers leave in (guix ui) and
such.  This is so that the (guix …) module are (almost) independent of
the (gnu …) modules.

That said, if you think of improvements, that’d be interesting!

> From a39b458002e2c4c36c9adb2718f166b4e5ff7965 Mon Sep 17 00:00:00 2001
> From: Mathieu Lirzin <mthl@gnu.org>
> Date: Sun, 28 Feb 2016 17:50:58 +0100
> Subject: [PATCH 1/2] packages: Factorize package specification search.
>
> * gnu/packages.scm (%find-package): New procedure.
> (specification->package, specification->package+output): Use it.

[...]

>  (define* (specification->package+output spec #:optional (output "out"))
>    "Return the package and output specified by SPEC, or #f and #f; SPEC may

[...]

> +    (and=> (%find-package spec name version)
> +           (lambda (pkg)
> +             (if (member sub-drv (package-outputs pkg))
> +                 (values pkg sub-drv)

This fragment can return a single value instead of two.  Thus, it should
be changed to something like:

  (match (%find-package spec name version)
    (#f
     (values #f #f))
    (package   ;no need to call it ‘pkg’  :-)
     …))

OK with this change!

> From a5d3eb26c06965647d0e1749b848f8501ae61d62 Mon Sep 17 00:00:00 2001
> From: Mathieu Lirzin <mthl@gnu.org>
> Date: Sun, 28 Feb 2016 23:11:36 +0100
> Subject: [PATCH 2/2] * utils: Use '@' for separating package names and version
>  numbers.

Extra star in subject.

> +*** New syntax for separating package names and version numbers
> +
> +Use ‘@’ instead of ‘-’ as a separator.  This new separator is a reserved
                                       ^^
Maybe add: “, as in ‘gnupg@2.0’.”

> +character which is not allowed both in package names and version numbers.

Maybe add:

  The old syntax to specify a package’s version—e.g., as “gnupg-2.0—is
  obsolete and support for it will be removed in the future.

OK with changes along these lines.

Thanks a lot!  This closes another item towards 0.9.1.  \o/

Ludo’.

  reply	other threads:[~2016-02-29 16:01 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-24 20:19 [PATCH 00/13] New syntax 'package@version' and compilation improvements Mathieu Lirzin
2016-01-24 20:19 ` [PATCH 01/13] tests: Use 'dummy-origin' for lint tests when possible Mathieu Lirzin
2016-01-26 15:58   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 02/13] lint: Remove an unneeded clause in 'check-patch-file-names' Mathieu Lirzin
2016-01-26 16:00   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 03/13] lint: Rewrite 'check-patch-file-names' Mathieu Lirzin
2016-01-26 16:01   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 04/13] utils: Use '@' for separating package names and version numbers Mathieu Lirzin
2016-01-25 11:37   ` Alex Kost
2016-01-25 20:56     ` Mathieu Lirzin
2016-01-26 16:22       ` Ludovic Courtès
2016-01-26 20:52         ` Mathieu Lirzin
2016-01-26 21:08           ` Ludovic Courtès
2016-02-19 20:49         ` Mathieu Lirzin
2016-02-23 11:11           ` Ludovic Courtès
2016-02-29  0:28             ` Mathieu Lirzin
2016-02-29 16:00               ` Ludovic Courtès [this message]
2016-03-02 21:35                 ` Mathieu Lirzin
2016-03-05  1:28                 ` Nils Gillmann
2016-03-05  9:24                   ` Alex Kost
2016-03-05  9:36                   ` Mathieu Lirzin
2016-03-03 10:29               ` Alex Kost
2016-03-03 16:55                 ` Ludovic Courtès
2016-03-04 10:19                   ` Alex Kost
2016-03-04 23:03                 ` Mathieu Lirzin
2016-03-04 23:25                   ` Ludovic Courtès
2016-03-05  1:08                     ` Mathieu Lirzin
2016-03-05  9:16                   ` Alex Kost
2016-01-25 14:04   ` Thompson, David
2016-01-25 21:41     ` Mathieu Lirzin
2016-01-25 23:33       ` Alex Kost
2016-01-26 17:57         ` Mathieu Lirzin
2016-01-24 20:19 ` [PATCH 05/13] packages: Use '@' in package record printers Mathieu Lirzin
2016-01-26 16:22   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 06/13] build: Generate man pages after compiling guile objects Mathieu Lirzin
2016-01-26 16:52   ` Ludovic Courtès
2016-01-26 20:08     ` Mathieu Lirzin
2016-01-28  2:37       ` Eric Bavier
2016-01-28 15:44         ` Mathieu Lirzin
2016-01-28 15:59           ` Eric Bavier
2016-01-28 17:00             ` Mathieu Lirzin
2016-01-29  0:27               ` Eric Bavier
2016-01-29 16:17                 ` Mathieu Lirzin
2016-01-29 16:46                   ` Eric Bavier
2016-01-29 22:56                     ` Mathieu Lirzin
2016-01-31  9:17                       ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 07/13] build: Add 'DL' silent rule Mathieu Lirzin
2016-01-26 16:28   ` Ludovic Courtès
2016-01-26 17:44     ` Mathieu Lirzin
2016-01-26 19:22       ` Taylan Ulrich Bayırlı/Kammer
2016-01-26 21:06       ` Ludovic Courtès
2016-01-26 21:14         ` Mathieu Lirzin
2016-01-24 20:19 ` [PATCH 08/13] build: Add 'DOT' " Mathieu Lirzin
2016-01-26 16:28   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 09/13] build: Add 'EMACS' " Mathieu Lirzin
2016-01-26 16:28   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 10/13] build: Add 'HELP2MAN' " Mathieu Lirzin
2016-01-26 16:29   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 11/13] build: Delete emacs/guix-autoloads.el when 'make clean' Mathieu Lirzin
2016-01-26 16:33   ` Ludovic Courtès
2016-01-26 22:55     ` Mathieu Lirzin
2016-01-24 20:19 ` [PATCH 12/13] build: Use 'GEN' and 'at' silent rules Mathieu Lirzin
2016-01-26 16:34   ` Ludovic Courtès
2016-01-24 20:19 ` [PATCH 13/13] Update .gitignore Mathieu Lirzin
2016-01-26 16:34   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ziujecay.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=alezost@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mthl@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).