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

From: Simon Tournier <[email-masked]>
Date: Fri, 24 Feb 2023 13:02:00 +0100

Hi,

On jeu., 23 févr. 2023 at 17:27, Maxim Cournoyer <[email-masked]> wrote:

> Hm.  That seems sub-optimal; it seems to me that ideally, the
> transformations would be additive, so that users would not need to care
> about the ordering.  Or perhaps, alternatively, we could enforce such
> ordering at the implementation level (sorting the transformations in the
> order that is required).

>From my point of view (and what I tried stopping in the middle :-)) is
to report if the transformation makes sense or not.  For instance,

    with-patch
    with-source

makes sense contrary to

    with-source
    with-patch

and it would already be an improvement to report that the latter
transformation does not make sense instead of silently does nothing or
raises some weird errors.

Well, I am not convinced that enforce the ordering is a good thing
because as Ludo said, some HPC user exploits this control of ordering to
generate complex transformations.

To me, the fix is:

 1. document the ordering bits
 2. check if the ordering “makes sense“ and raises if not.

Cheers,
simon