inconsistent parsing of the channel sexp's

  • Done
  • quality assurance status badge
Details
3 participants
  • Attila Lendvai
  • Ludovic Courtès
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Attila Lendvai
Severity
normal

Debbugs page

A
A
Attila Lendvai wrote on 31 Jan 2022 04:30
(name . bug-guix@gnu.org)(address . bug-guix@gnu.org)
vWS-lrAeFGLQaLuXJYXzWHtdxZUHeu7db8o26Xhm8tFRyyoaQBFf1DOKU19ll7am1Nod_FjRRcQyaWxQEEKBSZHTYHu7YhxINVXEByfdrVE=@lendvai.name
pull.scm does this with channel files, e.g. with /etc/guix/channels.scm:

(load* file (make-user-module '((guix channels))))

i.e. this way field values are EVAL'd. beside the big can of worms that this opens up, it also means that e.g. the name field must be quoted: (name 'guix).

then at other occurrences of channels, an sexp parser is used to read them, e.g. in the 'dependencies field of a .guix-channel entry. see READ-CHANNEL-METADATA in guix/channels.scm.

here the name field is not EVAL'd, and thus it must be specified without quotes: (name guix).

this leads to an actual issue that channel dependencies don't match up, unless the name is without quotes in the dependencies list specification.

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“Awareness isn’t something we own; awareness isn’t something we possess. Awareness is actually what we are.”
— Adyashanti (1962–)
R
R
Ricardo Wurmus wrote on 1 Feb 2022 06:41
(address . 53657@debbugs.gnu.org)
87czk68x59.fsf@elephly.net
Thanks for the bug report.

I feel like I’m missing something here.

Toggle quote (4 lines)
> this leads to an actual issue that channel dependencies don't match up,
> unless the name is without quotes in the dependencies list
> specification.

I don’t understand what it means for “channel dependencies” to “match
up”. How is this an issue?

I’ll say that I agree that there’s an apparent inconsistency (as
evidenced also by commit 52e64b21be50e2c5febd7bf1accd88ffdc05a4bb, which
corrected a mistake in the documentation that used an explicit quote), I
just don’t see yet how it leads to a practical problem.

Could you please elaborate?

--
Ricardo
L
L
Ludovic Courtès wrote on 2 Mar 2022 02:44
(name . Attila Lendvai)(address . attila@lendvai.name)(address . 53657@debbugs.gnu.org)
874k4g4orb.fsf@gnu.org
Hi,

Attila Lendvai <attila@lendvai.name> skribis:

Toggle quote (12 lines)
> pull.scm does this with channel files, e.g. with /etc/guix/channels.scm:
>
> (load* file (make-user-module '((guix channels))))
>
> i.e. this way field values are EVAL'd. beside the big can of worms that this opens up, it also means that e.g. the name field must be quoted: (name 'guix).
>
> then at other occurrences of channels, an sexp parser is used to read them, e.g. in the 'dependencies field of a .guix-channel entry. see READ-CHANNEL-METADATA in guix/channels.scm.
>
> here the name field is not EVAL'd, and thus it must be specified without quotes: (name guix).
>
> this leads to an actual issue that channel dependencies don't match up, unless the name is without quotes in the dependencies list specification.

Yes, but that’s okay: the ‘.guix-channel’ file has a syntax that looks
similar but is different from that of ‘~/.config/guix/channels.scm’, as
you explained (and as the manual explains, I think.) This is on
purpose.

I understand it might look confusing but I’m not sure there’s much we
can do.

Thoughts?

Ludo’.
L
L
Ludovic Courtès wrote on 2 Mar 2022 02:45
control message for bug #53657
(address . control@debbugs.gnu.org)
8735k04oqo.fsf@gnu.org
tags 53657 notabug
close 53657
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 53657@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 53657
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch