guix-devel
[Top][All Lists]
Advanced

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

Re: Transform options should error on nonexistant targets


From: zimoun
Subject: Re: Transform options should error on nonexistant targets
Date: Fri, 17 Sep 2021 10:57:42 +0200

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



reply via email to

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