unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 61684@debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: bug#61684: can't compose 'with-patch' with 'with-source'
Date: Tue, 28 Feb 2023 11:00:08 +0100	[thread overview]
Message-ID: <87y1oijejb.fsf@gmail.com> (raw)
In-Reply-To: <878rgjkxnw.fsf@gnu.org>

Hi Ludo,

On lun., 27 févr. 2023 at 15:09, Ludovic Courtès <ludo@gnu.org> wrote:

> However, as I explained before, there’s no clear way to do that for two
> reasons:
>
>   1. Transformations apply to bags, not packages, so we cannot tell
>      whether a transformation has an effect until after the transformed
>      package has been lowered.  Even then, it’s tricky.
>
>   2. In this case, this has to do with the semantics of transformations
>      themselves: by definition, ‘with-source’ dismisses patches.

I probably miss many details and that’s why I do not understand
correctly your words.  Or maybe we are not using the same meaning behind
“report if the transformation makes sense or not”.


 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.


For instance,

--8<---------------cut here---------------start------------->8---
  (define applicable
    ;; List of applicable transformations as symbol/procedure pairs in the
    ;; order in which they appear on the command line.
    (filter-map (match-lambda
                  ((key . value)
                   (match (transformation-procedure key)
                     (#f
                      #f)
                     (transform
                      ;; XXX: We used to pass TRANSFORM a list of several
                      ;; arguments, but we now pass only one, assuming that
                      ;; transform composes well.
                      (list key value (transform (list value)))))))
                (reverse opts)))
--8<---------------cut here---------------end--------------->8---

and I miss why,

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

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.


Cheers,
simon




  reply	other threads:[~2023-02-28 10:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 18:08 bug#61684: can't compose 'with-patch' with 'with-source' Maxim Cournoyer
2023-02-21 19:05 ` Simon Tournier
2023-02-23 14:08 ` Ludovic Courtès
2023-02-23 22:27   ` Maxim Cournoyer
2023-02-24 12:02     ` Simon Tournier
2023-02-24 13:21       ` Maxim Cournoyer
2023-02-24 13:43         ` Simon Tournier
2023-02-24 13:52           ` Maxim Cournoyer
2023-02-25 12:29             ` Simon Tournier
2023-02-25 19:43               ` Maxim Cournoyer
2023-02-27 14:12             ` Ludovic Courtès
2023-02-27 16:29               ` Maxim Cournoyer
2023-02-27 14:09       ` Ludovic Courtès
2023-02-28 10:00         ` Simon Tournier [this message]
2023-03-01 15:49           ` Ludovic Courtès
2023-02-24 13:59   ` Maxim Cournoyer
2023-03-03  9:43     ` Ludovic Courtès

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=87y1oijejb.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=61684@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /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).