GNU bug report logs -
#42247
Channel news raise error on `guix pull`
Previous Next
Reported by: Pierre Neidhardt <mail <at> ambrevar.xyz>
Date: Tue, 7 Jul 2020 14:55:02 UTC
Severity: normal
Tags: notabug
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42247 in the body.
You can then email your comments to 42247 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#42247
; Package
guix
.
(Tue, 07 Jul 2020 14:55:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Pierre Neidhardt <mail <at> ambrevar.xyz>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Tue, 07 Jul 2020 14:55:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I've added a news-file entry to my channel:
--8<---------------cut here---------------start------------->8---
(channel
(version 0)
(news-file "news.scm"))
--8<---------------cut here---------------end--------------->8---
which contains
--8<---------------cut here---------------start------------->8---
(channel-news
(version 0)
(entry (commit "25387230a7f99c2b0886488ed061747c9e00434a")
(title (en "Hello"))
(body (en "World!"))))
--8<---------------cut here---------------end--------------->8---
Reading the news file from the REPL works.
--8<---------------cut here---------------start------------->8---
(with-input-from-file "/home/ambrevar/projects/foo/news.scm"
(lambda ()
(read-channel-news (current-input-port))))
--8<---------------cut here---------------end--------------->8---
However, guix pull chokes on it:
--8<---------------cut here---------------start------------->8---
(repl-version 0 0)
(exception unbound-variable (value #f) (value "Unbound variable: ~S") (value (channel-news)) (value #f))
--8<---------------cut here---------------end--------------->8---
I first encountered this issue in Feb 2020, but this issue might have
been around since channel news were introduced.
--
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#42247
; Package
guix
.
(Thu, 09 Jul 2020 22:27:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 42247 <at> debbugs.gnu.org (full text, mbox):
Hi,
Pierre Neidhardt <mail <at> ambrevar.xyz> skribis:
> However, guix pull chokes on it:
>
> (repl-version 0 0)
> (exception unbound-variable (value #f) (value "Unbound variable: ~S") (value (channel-news)) (value #f))
This suggests that the ‘news.scm’ file of your channel is being picked
up and evaluated as if it were a module, which it’s not.
The solution is to rename it to, say, ‘news.txt’, or to move the actual
modules to a sub-directory and specify that in ‘.guix-channel’ (info
"(guix) Channels").
HTH!
Ludo’.
Added tag(s) notabug.
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 09 Jul 2020 22:28:01 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
42247 <at> debbugs.gnu.org and Pierre Neidhardt <mail <at> ambrevar.xyz>
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Thu, 09 Jul 2020 22:28:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#42247
; Package
guix
.
(Sat, 11 Jul 2020 09:14:01 GMT)
Full text and
rfc822 format available.
Message #15 received at 42247 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:
> This suggests that the ‘news.scm’ file of your channel is being picked
> up and evaluated as if it were a module, which it’s not.
>
> The solution is to rename it to, say, ‘news.txt’, or to move the actual
> modules to a sub-directory and specify that in ‘.guix-channel’ (info
> "(guix) Channels").
Thanks for the hint, this works indeed!
1. Is there anything we can do to catch this error and output a more
intelligible error message?
2. I suggest we document this pitfall in the documentation.
Cheers!
--
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#42247
; Package
guix
.
(Mon, 13 Jul 2020 10:28:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 42247 <at> debbugs.gnu.org (full text, mbox):
Hi,
Pierre Neidhardt <mail <at> ambrevar.xyz> skribis:
> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> This suggests that the ‘news.scm’ file of your channel is being picked
>> up and evaluated as if it were a module, which it’s not.
>>
>> The solution is to rename it to, say, ‘news.txt’, or to move the actual
>> modules to a sub-directory and specify that in ‘.guix-channel’ (info
>> "(guix) Channels").
>
> Thanks for the hint, this works indeed!
>
> 1. Is there anything we can do to catch this error and output a more
> intelligible error message?
I don’t think so: Guile is just doing its job and picking up .scm
files.
> 2. I suggest we document this pitfall in the documentation.
Yup, makes sense; would you like to send a patch?
Thanks,
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#42247
; Package
guix
.
(Mon, 13 Jul 2020 12:51:01 GMT)
Full text and
rfc822 format available.
Message #21 received at 42247 <at> debbugs.gnu.org (full text, mbox):
On +2020-07-13 12:27:39 +0200, Ludovic Courtès wrote:
> Hi,
>
> Pierre Neidhardt <mail <at> ambrevar.xyz> skribis:
>
> > Ludovic Courtès <ludo <at> gnu.org> writes:
> >
> >> This suggests that the ‘news.scm’ file of your channel is being picked
> >> up and evaluated as if it were a module, which it’s not.
> >>
> >> The solution is to rename it to, say, ‘news.txt’, or to move the actual
> >> modules to a sub-directory and specify that in ‘.guix-channel’ (info
> >> "(guix) Channels").
> >
> > Thanks for the hint, this works indeed!
> >
> > 1. Is there anything we can do to catch this error and output a more
> > intelligible error message?
>
> I don’t think so: Guile is just doing its job and picking up .scm
> files.
>
You are not saying that a file extension is used as hard type data
when "Guile is just doing its job ..." are you?? (unless the producer
of the filename is contracted to guarantee the extension semantics in
guile's environment at the run-time in question ...
but where is such policy documented, if so? (I don't mean looking for
.go files newer than corresponding .scm, etc))
> > 2. I suggest we document this pitfall in the documentation.
>
> Yup, makes sense; would you like to send a patch?
>
> Thanks,
> Ludo’.
>
>
>
--
Regards,
Bengt Richter
Information forwarded
to
bug-guix <at> gnu.org
:
bug#42247
; Package
guix
.
(Tue, 14 Jul 2020 08:55:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 42247 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Done: 42351 <at> debbugs.gnu.org
--
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 11 Aug 2020 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 251 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.