unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: Transform options should error on nonexistant targets
Date: Fri, 17 Sep 2021 10:57:42 +0200	[thread overview]
Message-ID: <CAJ3okZ23ZN4SPbShQQXFY8s7XaqNy_nCmj37HqsiQHP2qaPcig@mail.gmail.com> (raw)
In-Reply-To: <8735qe23el.fsf@gnu.org>

Hi,

On Wed, 8 Sept 2021 at 22:55, Ludovic Courtès <ludo@gnu.org> wrote:

> >  Each symbol names a transformation and the corresponding string is an argument
> >  to that transformation."
> > +  (define (package-name? value)
>
> Rather ‘assert-package-specification’, since it’s used for control
> effects (exception raised by ‘specification->package’).

Thanks.  Indeed, it is better.

> > +    ;; Return an error if value does not correspond to a package.
> > +    (match (string-tokenize value %not-equal)
> > +      ((name _ ...)
> > +       (specification->package name))))
>
> The problem I see is that it prevents rewrites where the package to be
> rewritten is not public.  Maybe that’s an acceptable tradeoff though,
> I’m not sure.

Yes.  It is already used by 'evaluate-replacement-specs' and
'transform-package-toolchain'.  That's why I used it.  And it appeared
to me the simplest. :-)


All the best,
simon


      parent reply	other threads:[~2021-09-17  8:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18  3:57 Transform options should error on nonexistant targets Ryan Prior
2021-08-25 16:16 ` zimoun
2021-09-02 10:06   ` Ludovic Courtès
2021-09-02 10:50     ` zimoun
2021-09-08 20:55       ` Ludovic Courtès
2021-09-08 22:29         ` Transform options: check if applied or not zimoun
2021-09-09 10:32           ` Maxime Devos
2021-09-11 12:09         ` Transform: walk through packages zimoun
2021-09-17  8:57         ` zimoun [this message]

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=CAJ3okZ23ZN4SPbShQQXFY8s7XaqNy_nCmj37HqsiQHP2qaPcig@mail.gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@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).