From: Maxime Devos <maximedevos@telenet.be>
To: bokr@bokr.com, zimoun <zimon.toutoune@gmail.com>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Sanitizer of record fields?
Date: Thu, 8 Sep 2022 13:43:01 +0200 [thread overview]
Message-ID: <b6dd7a18-334b-4feb-6c1f-09e7fca7552b@telenet.be> (raw)
In-Reply-To: <20220908113548.GA9601@LionPure>
[-- Attachment #1.1.1: Type: text/plain, Size: 2198 bytes --]
On 08-09-2022 13:35, bokr@bokr.com wrote:
> Hi Simon, et al
>
> On +2022-09-08 09:59:15 +0200, zimoun wrote:
>> Hi,
>>
>> The website is currently failing [1] to build because a typo in some
>> package declaration. The error message is not very helpful,
>>
>> srfi/srfi-1.scm:241:2: In procedure map:
>> In procedure map: Wrong type argument: "https://www.qt.io/"
>> building pages in '/tmp/gnu.org/software/guix'...
>>
> ISTM this "wrong type argument" is an infuriatingly common
> and typically useless error message.
>
> Would it be possible to have a debugging hook where the message is output
> which if activated would show the call stack, so one could see where in
> the user code it happened?
>
> Activation could I imagine be by guile checking e.g.
> "GUILE_THROW_DEBUG_WRONG_ARGUMENT" on invocation, to turn on the hook
> in a way that would have zero performance effect if not activated.
Why a hook / environment variable in Guile? Backtraces are printed
by default, I do not see the benefit of disabling them by default and
adding an environment variable to enable them:
> antipode@antipode ~$ guile -c '(map 0 1)'
> Backtrace:
> In ice-9/boot-9.scm:
> 1752:10 6 (with-exception-handler _ _ #:unwind? _ # _)
> In unknown file:
> 5 (apply-smob/0 #<thunk 7fa30cc882e0>)
> In ice-9/boot-9.scm:
> 724:2 4 (call-with-prompt ("prompt") #<procedure 7fa30cc9acc0 …> …)
> In ice-9/eval.scm:
> 619:8 3 (_ #(#(#<directory (guile-user) 7fa30cc8dc80>)))
> In ice-9/command-line.scm:
> 185:19 2 (_ #<input: string 7fa30cc87850>)
> In unknown file:
> 1 (eval (map 0 1) #<directory (guile-user) 7fa30cc8dc80>)
> In ice-9/boot-9.scm:
> 218:9 0 (map 0 1)
>
> ice-9/boot-9.scm:218:9: In procedure map:
> In procedure map: Not a list: 1
Problem is already solved.
It appears that the website code catches exceptions and prints the error
message,
but forgets to print the backtrace, but that seems to be a choice that
the website
code made, not Guile. (Likely, an accidental choice, that can be improved.)
Greetings,
Maxime.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next prev parent reply other threads:[~2022-09-08 11:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-08 7:59 Sanitizer of record fields? zimoun
2022-09-08 9:32 ` Maxime Devos
2022-09-08 11:16 ` zimoun
2022-09-08 11:33 ` Maxime Devos
2022-09-08 11:35 ` bokr
2022-09-08 11:43 ` Maxime Devos [this message]
2022-09-08 11:44 ` Maxime Devos
2022-09-08 12:50 ` zimoun
2022-10-01 16:35 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b6dd7a18-334b-4feb-6c1f-09e7fca7552b@telenet.be \
--to=maximedevos@telenet.be \
--cc=bokr@bokr.com \
--cc=guix-devel@gnu.org \
--cc=zimon.toutoune@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).