[PATCH] guix: channels: Add description field.

  • Done
  • quality assurance status badge
Details
3 participants
  • jgart
  • Liliana Marie Prikler
  • Ludovic Courtès
Owner
unassigned
Submitted by
jgart
Severity
normal
J
J
jgart wrote on 7 Jan 2023 17:24
(address . guix-patches@gnu.org)(name . jgart)(address . jgart@dismail.de)
20230107162431.6739-1-jgart@dismail.de
* guix/channels.scm (<channel>): Add channel description field and
comment disambiguating the type expected in an introduction field.
* doc/guix.scm (Invoking guix describe): Add channel description field
to channels record instance example.

This commit adds an optional description field to a channel intended to
describe the channel. Its purpose is similar to the description field
in a <package> record.
---
doc/guix.texi | 2 ++
guix/channels.scm | 15 ++++++++-------
2 files changed, 10 insertions(+), 7 deletions(-)

Toggle diff (41 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 24d99cbf24..483d2fbaa4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5063,6 +5063,8 @@ $ guix describe -f channels
(list (channel
(name 'guix)
(url "https://git.savannah.gnu.org/git/guix.git")
+ (description "The main GNU Guix channel providing the core
+package collection along with Guix and its documentation.")
(commit
"e0fa68c7718fffd33d81af415279d6ddb518f727")
(introduction
diff --git a/guix/channels.scm b/guix/channels.scm
index d84228c47e..8acf3d8742 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -122,13 +122,14 @@ (define-module (guix channels)
(define-record-type* <channel> channel make-channel
channel?
- (name channel-name)
- (url channel-url)
- (branch channel-branch (default "master"))
- (commit channel-commit (default #f))
- (introduction channel-introduction (default #f))
- (location channel-location
- (default (current-source-location)) (innate)))
+ (name channel-name)
+ (url channel-url)
+ (description channel-description (default #f)) ; string
+ (branch channel-branch (default "master"))
+ (commit channel-commit (default #f))
+ (introduction channel-introduction (default #f)) ; <channel-introduction>
+ (location channel-location
+ (default (current-source-location)) (innate)))
;; Channel introductions. A "channel introduction" provides a commit/signer
;; pair that specifies the first commit of the authentication process as well
--
2.38.1
L
L
Liliana Marie Prikler wrote on 8 Jan 2023 16:43
275d6e457ade39fc591062a6274ebaf2960d1b5d.camel@gmail.com
Am Samstag, dem 07.01.2023 um 10:24 -0600 schrieb jgart:
Toggle quote (8 lines)
> * guix/channels.scm (<channel>): Add channel description field and
> comment disambiguating the type expected in an introduction field.
> * doc/guix.scm (Invoking guix describe): Add channel description
> field to channels record instance example.
>
> This commit adds an optional description field to a channel intended
> to describe the channel. Its purpose is similar to the description
> field in a <package> record.
Since channel descriptions would be maintained by the user and neither
Guix' nor the channel's authors, I think it's safe to say that this
description field would in effect be nothing more but a comment.
Paired with the fact that introducing it would break ABI, I'm not too
sure whether this is a good idea.

Cheers

PS: Apologize the copy, I typo'd on the bug thread.
L
L
Ludovic Courtès wrote on 9 Jan 2023 17:25
Re: bug#60630: [PATCH] guix: channels: Add description field.
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
874jszsmio.fsf_-_@gnu.org
Hi,

Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:

Toggle quote (13 lines)
> Am Samstag, dem 07.01.2023 um 10:24 -0600 schrieb jgart:
>> * guix/channels.scm (<channel>): Add channel description field and
>> comment disambiguating the type expected in an introduction field.
>> * doc/guix.scm (Invoking guix describe): Add channel description
>> field to channels record instance example.
>>
>> This commit adds an optional description field to a channel intended
>> to describe the channel. Its purpose is similar to the description
>> field in a <package> record.
> Since channel descriptions would be maintained by the user and neither
> Guix' nor the channel's authors, I think it's safe to say that this
> description field would in effect be nothing more but a comment.

Right, I agree. What use case did you have in mind, jgart?

Most likely, a description could go to the ‘.guix-channel’ file, if it’s
of any use.

Thanks,
Ludo’.
J
(address . 60630@debbugs.gnu.org)
b689d55184cee4046ecb248e1502f395@dismail.de
Hi Ludo and Liliana,

Now after thinking more about and discussing my previous proposal with people I also agree with you that it is not the best approach.

Toggle quote (2 lines)
> Right, I agree. What use case did you have in mind, jgart?

See the search that we are building here:

https://toys.whereis.???/

toys is a channel webring in the form of a web API. It currently allows searching for public symbols (parses docstring info if available), services, and packages across the Guix channels that are part of the webring channels.scm file: https://git.sr.ht/~whereiseveryone/toys/tree/master/item/channels.scm

We'd like to be able to have a standardized way to get a channel description in the same way that we have a standardized way to get a description or synopsis of a package.

In other words, we want to make it easy to describe each channel for the users that subscribe to that channel or are browsing channels for stuff that they might want to use.

Toggle quote (2 lines)
> Most likely, a description could go to the ‘.guix-channel’ file, if it’s

unmatched-paren had suggested this very idea to me yesterday.

unmatched-paren also mentioned the following:

Toggle quote (2 lines)
> you'd also want to change guix/scripts/pull.scm to display the description when a new channel addition is announced

Feel free to close this ticket and when I get some free time I'll try to send a patch implementing the description field to `.guix-channel`.

If you have any other suggestions before I send that patch proposal for review feel free to comment now or then.

all best,

jgart

L
L
Ludovic Courtès wrote on 10 Jan 2023 10:50
(name . jgart)(address . jgart@dismail.de)
875ydepvkg.fsf_-_@gnu.org
Hi,

"jgart" <jgart@dismail.de> skribis:

Toggle quote (6 lines)
>> Right, I agree. What use case did you have in mind, jgart?
>
> See the search that we are building here:
>
> https://toys.whereis.???/

Woow, very nice! We definitely need that kind of tool.

There might be interesting stuff to borrow/share with hpcguix-web, in
particular the bit the periodically updates channels from which packages
are displayed.

Toggle quote (6 lines)
> toys is a channel webring in the form of a web API. It currently allows searching for public symbols (parses docstring info if available), services, and packages across the Guix channels that are part of the webring channels.scm file: https://git.sr.ht/~whereiseveryone/toys/tree/master/item/channels.scm
>
> We'd like to be able to have a standardized way to get a channel description in the same way that we have a standardized way to get a description or synopsis of a package.
>
> In other words, we want to make it easy to describe each channel for the users that subscribe to that channel or are browsing channels for stuff that they might want to use.

Right, so I think this could go in <channel-metadata> and
‘read-channel-metadata’, which is what reads ‘.guix-channel’. To
support i18n, we might want to have a format similar to that of channel
news files.

As additional metadata, we might want to add a link to a logo, to a
substitute server, substitute key, and things like that, as in:


So I’m closing this one and looking forward to addressing this!

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 10 Jan 2023 10:54
control message for bug #60630
(address . control@debbugs.gnu.org)
874jsypvdy.fsf@gnu.org
tags 60630 wontfix
close 60630
quit
?