GNU bug report logs - #62589
Help with patch with delayed evaluation

Previous Next

Package: guix;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Sat, 1 Apr 2023 10:00:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, 62589 <at> debbugs.gnu.org
Subject: bug#62589: Help with patch with delayed evaluation
Date: Sat, 01 Apr 2023 12:58:55 +0200
On 2023-04-01 12:28, Ludovic Courtès wrote:

> Hi,
>
> Nicolas Graves <ngraves <at> ngraves.fr> skribis:
>
>> +(define* (make-nerd-dictation-package
>> +          input-tool output-tool
>> +          #:key (nerd-dictation-package nerd-dictation))
>> +  "Construct a nerd-dictation package for OUTPUT-TOOL."
>> +  (match-let* (((input-name output-name)
>> +                (map (lambda (tool)
>> +                       (lazy
>> +                        (delay (package-name (force tool)))))
>> +                     (list input-tool output-tool))))
>> +    (package
>> +      (inherit nerd-dictation-package)
>> +      (name (string-append "nerd-dictation-"
>> +                           (if (equal? (force input-name) "sox")
>> +                               "sox-"
>> +                              "")
>> +                           (force output-name)))
>
> I don’t understand the details of what the patch does, but as a rule of
> thumb, make sure you only ever inherit from packages defined in the same
> module.

The patch defines a helper for defining variants of nerd-dictation. It
now supports wtype and I wasn't totally satisfied by international
support for ydotool, so I wanted to switch, but copying it make a lot of
repeated code.

I already defined such a helper with Liliana Marie Prinkler with
make-emacs-eval-in-repl, but this time I don't understand this error.

Josselin was suggesting a module import cycle, (gnu packages
machine-learning) is imported in (gnu packages audio), the error might
come from there. 

>
> Perhaps that’s what was going wrong?

I've tried inheriting from the above package direclty, doesn't seem to
be that.

>
> HTH,
> Ludo’.

-- 
Best regards,
Nicolas Graves




This bug report was last modified 2 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.