Subject: bug#65665: [PATCH] Really get all the implicit inputs.

From: Simon Tournier <[email-masked]>
Date: Thu, 12 Oct 2023 16:22:43 +0200

Hi Maxim,

On Thu, 05 Oct 2023 at 22:36, Maxim Cournoyer <[email-masked]> wrote:

> I've reviewed it, and it makes sense to me.  I'd like to apply it to the
> core-updates branch.  Core team, what say you?

Well, I am not sure to deeply understand some details to get all the
implications here, so I have nothing relevant to say.  For instance,
from my understanding, the core change is:

--8<---------------cut here---------------start------------->8---
+  (define (rewrite-argument arg)
+    (match arg
+      ((? package? p)
+       (replace p))
+      ((? gexp-input? gi)
+       (gexp-input (rewrite-argument (gexp-input-thing gi))
+                   (gexp-input-output gi)
+                   #:native? (gexp-input-native? gi)))
+      ((? gexp? gxp)
+       (make-gexp (map rewrite-argument (gexp-references gxp))
+                  (gexp-self-modules gxp)
+                  (gexp-self-extensions gxp)
+                  (gexp-proc gxp)
+                  (%gexp-location gxp)))
+      ((lst ...)
+       (map rewrite-argument lst))
+      (_
+       arg)))
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
+                 (arguments
+                  (match p
+                       (($ <package> _ _ _ _ args-proc)
+                        ;; If we let ARGS-PROC be passed its original package,
+                        ;; we somehow end up in an infinite (or maybe just
+                        ;; exponential? Never seen it end...) loop.  Should
+                        ;; probably figure out what's causing that at some
+                        ;; point.
+                        (let ((args (args-proc this-package)))
+                          (if deep?
+                              (map rewrite-argument args)
+                              args)))))
--8<---------------cut here---------------end--------------->8---

and I do not feel enough skilled here for getting the implications.
Equally for this kind of changes:

--8<---------------cut here---------------start------------->8---
-         (arguments (strip-keyword-arguments private-keywords arguments)))))
+         (arguments
+          (substitute-keyword-arguments
+              (strip-keyword-arguments private-keywords arguments)
+            ((#:guile _ #t) guile))))))
--8<---------------cut here---------------end--------------->8---

Therefore, I trust other opinions or I need some time for diving and
filling some gaps.

Cheers,
simon