Subject: bug#71828: Commands that pull channels don't cleanly report errors

From: Richard Sent <[email-masked]>
Date: Fri, 28 Jun 2024 16:20:27 -0400

Hi Guix!

When a command such as guix time-machine pulls a channel, if there is
invalid scheme code in, say, the .guix-authorizations file, the error
message reported to the user doesn't make it clear where the problem is.

--8<---------------cut here---------------start------------->8---
gibraltar :( temp$ guix time-machine -C channels.scm -- describe
Updating channel 'pita-packs' from Git repository at 'https://codeberg.org/JetpackJackson/guix-pita-packs.git'...
Authenticating channel 'pita-packs', commits 2970fc3 to 429703d (3 new commits)...
▕███████████████████████████████████████████████████▉                                                                                                        ▏ice-9/boot-9.scm:1685:16: In procedure raise-exception:
#<unknown port>:5:1: unexpected end of input while searching for: )
--8<---------------cut here---------------end--------------->8---

In this case, pita-pack's .guix-authorizations file is missing ending
parenthesis.

This error message should be improved to say

a) What channel is causing the problem

b) What file we're parsing that threw the error

See some of the chat log here:
https://logs.guix.gnu.org/guix/2024-06-28.log.

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.