unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Florian Paul Schmidt <mista.tapas@gmx.net>
Cc: guix-devel@gnu.org
Subject: Re: proposal: (define (find-guix-packages list-of-names) ... )
Date: Mon, 16 Nov 2015 14:03:04 +0100	[thread overview]
Message-ID: <87ziye6qrb.fsf@gnu.org> (raw)
In-Reply-To: <5648F83C.8010302@gmx.net> (Florian Paul Schmidt's message of "Sun, 15 Nov 2015 22:25:16 +0100")

Florian Paul Schmidt <mista.tapas@gmx.net> skribis:

> Hi, and thanks for your reply..
>
> On 11/15/2015 09:35 PM, Ludovic Courtès wrote:
>
>> I think ‘specification->package’ from (gnu packages) is the
>> procedure you want.  Like this:
>>
>> (map specification->package '("guile-2" "gnupg-2.0" "coreutils"))
>>
>> It emits a warning in case the specification is ambiguous.
>>
>> Maybe we could/should use it in the example GuixSD configurations,
>> and at least document it somewhere.
>>
>> WDYT?
>
> Sounds like a plan. Though in this use-case I think I'd prefer an
> error over a warning. For the simple reason that during system
> reconfigure a warning might be missed easily. Especially after a guix
> pull where suddenly a package spec might become ambiguous where it
> wasn't before and a different package gets chosen.
>
> OTOH, maybe that's overdoing it and even with the error instead of a
> warning there are still some failure modes somewhat similar to this:
> E.g. Package foo disappears while a quite different package foo
> appears (possibly in a different module). Quite unlikely but possible.

There’s a range of options here: referring to variables by name (this is
best, you get an error if you got the name wrong, etc.; downside is you
need to know what modules to import), using ‘specification->package’, or
using something like what you suggested initially.

I’m fine with documenting ‘specification->package’ as an alternate
option.  Its semantics are exactly the same as when referring to a
package by name on the command line (a warning if it’s ambiguous, not an
error), which seems reasonable.

Thoughts?

Ludo’.

  reply	other threads:[~2015-11-16 13:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12  8:21 proposal: (define (find-guix-packages list-of-names) ... ) Florian Paul Schmidt
2015-11-15 20:35 ` Ludovic Courtès
2015-11-15 21:25   ` Florian Paul Schmidt
2015-11-16 13:03     ` Ludovic Courtès [this message]
2015-11-16 19:31       ` Florian Paul Schmidt
2015-11-16 20:06         ` Ludovic Courtès
2015-11-20 18:21           ` Florian Paul Schmidt
2015-11-28 15:39             ` Ludovic Courtès
2015-11-29 11:32               ` Florian Paul Schmidt

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=87ziye6qrb.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=mista.tapas@gmx.net \
    /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).