GNU bug report logs - #33448
[PATCH] describe: Fix 'format' option.

Previous Next

Package: guix-patches;

Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>

Date: Tue, 20 Nov 2018 22:27:01 UTC

Severity: normal

Tags: patch

Merged with 33453

Done: Oleg Pykhalov <go.wigust <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #52 received at 33448 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 33448 <at> debbugs.gnu.org
Subject: Re: [bug#33448] [PATCH 2/3] describe: Add json format.
Date: Thu, 22 Nov 2018 17:53:05 +0100
Hi Oleg,

Oleg Pykhalov <go.wigust <at> gmail.com> skribis:

> Almost done with current patch series and only one question.
>
> ludo <at> gnu.org (Ludovic Courtès) writes:
>
>> Oleg Pykhalov <go.wigust <at> gmail.com> skribis:
>>
>>> * guix/channels.scm (channel->json): New procedure.
>>> * guix/scripts/describe.scm (%options): Add 'json' option.
>>> (display-checkout-info, display-profile-info): Use 'channel->json'.
>>> * doc/guix.texi (Invoking guix describe): Document this.
>>
>> [...]
>>
>>> +(define channel->json
>>> +  (match-lambda
>>> +    (($ <channel> name url branch commit location)
>>> +     (scm->json-string
>>> +      (list
>>> +       (cons 'name name)
>>> +       (cons 'url url)
>>> +       (cons 'commit commit))))))
>>
>> Since this is not a core feature of channels and add a dependency on
>> (json), what about moving this procedure to (guix scripts describe)?
>
> <channel> should be exported in (guix channels) in this case.  Is it OK?

No I think we should avoid exporting <channel>, but anyway we can write
this procedure as:

  (lambda (channel)
    (scm->json-string `((name . ,(channel-name channel)) …)))

Ludo’.




This bug report was last modified 6 years and 178 days ago.

Previous Next


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