Subject: Re: bug#61684: can't compose 'with-patch' with 'with-source'

From: Ludovic Courtès <[email-masked]>
Date: Wed, 01 Mar 2023 16:49:33 +0100

Hi,

Simon Tournier <[email-masked]> skribis:

>  1. From my point of view, the transformations are functions that you
>     compose.  The composition rule is not commutative maybe neither
>     associative.  Writing down how each function (transformation)
>     composes with the others allows to specify the composition rules.
>
>  2. All the code in (guix transformations) acts at the package level, so
>     I am still missing why it would not be possible to detect some
>     issues there.

Please check out ‘package-input-rewriting’ and its behavior
with #:deep? #t.  Design discussion: <https://issues.guix.gnu.org/43578>.

>  1. it would not be possible to check if the transforms compose well;
>     somehow verify the assumption.

Try it.  :-)  I tried to explain it multiple times, I really did, but I
guess there’s no substitute to first-hand experience.

> For instance, ’package-with-upstream-version’ raises many warnings
> depending on various cases, and I miss why,
>
>  2. it would not be possible to have similar warnings for other
>     transformations.

‘package-with-upstream-version’ raises warnings that depend exclusively
on local knowledge.

Here we’re talking about warnings related to the composition to two
different options which, like you wrote, are independent functions.
It’s not similar.

HTH!

Ludo’.