Subject: bug#46778: set-grafting: regression in "guix graph"

From: zimoun <[email-masked]>
Date: Thu, 25 Feb 2021 19:06:42 +0100

Hi,

Using commit 3c548c3e0e, "guix graph hello" works.  However, commit
db45712a67 "grafts: Inline 'grafting?' and 'set-grafting'" seems to
introduce a regression:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix graph hello
Backtrace:
In ice-9/boot-9.scm:
  1736:10 14 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In unknown file:
          13 (apply-smob/0 #<thunk 7f204bef3520>)
In ice-9/boot-9.scm:
    718:2 12 (call-with-prompt _ _ #<procedure default-prompt-handler (k pr=
oc)>)
In ice-9/eval.scm:
    619:8 11 (_ #(#(#<directory (guile-user) 7f204bef6c80>)))
In guix/ui.scm:
  2162:12 10 (run-guix-command _ . _)
In guix/scripts/graph.scm:
    573:2  9 (guix-graph . _)
In ice-9/boot-9.scm:
  1736:10  8 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
  1731:15  7 (with-exception-handler #<procedure 7f204a0cb270 at ice-9/boot=
-9.scm:1815:7 (exn)> _ #:unwind? _ #:unwind-for-type _)
  1736:10  6 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
    152:2  5 (with-fluid* _ _ _)
In unknown file:
           4 (_ #<procedure 7f2049e15320 at ice-9/eval.scm:330:13 ()> #<pro=
cedure 7f2049e152e0 at ice-9/eval.scm:383:13 rest> #<procedure call-with-va=
lues (producer consumer)>)
In guix/scripts/graph.scm:
   598:37  3 (_ #<store-connection 256.99 7f2049ee3c30>)
   598:37  2 (_ #f)
In ice-9/boot-9.scm:
  1669:16  1 (raise-exception _ #:continuable? _)
  1669:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Wrong type to apply: #<syntax-transformer set-grafting>
--8<---------------cut here---------------end--------------->8---

All the best,
simon