[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guile debugger workgroup?
From: |
Maxim Cournoyer |
Subject: |
Re: Guile debugger workgroup? |
Date: |
Sun, 27 Nov 2022 21:06:34 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi Attila,
Attila Lendvai <attila@lendvai.name> writes:
> coming from common lisp (and SBCL in particular), i think the lowest
> hanging fruit in the guile debugging experience is making sure that
> backtraces are not cut short when printed.
>
> i tried multiple ways to configure the printer to acquire more info,
> but it didn't react to anything i tried:
>
> (setenv "COLUMNS" "300")
> (debug-set! width 160)
> (debug-set! depth 1000)
>
> this is regularly causing me frustration when all i need to make
> progress is in the cut off part of the backtrace, and the code in
> question is in a part of the codebase that i can't easily change to
> add some good old printf's.
Thanks for reminding me of this problem. I thought the following might
do it:
--8<---------------cut here---------------start------------->8---
modified doc/guix.texi
@@ -18263,6 +18263,10 @@ This data type represents the configuration of the
Guix build daemon.
@item @code{guix} (default: @var{guix})
The Guix package to use.
+@item @code{backtrace-width} (default: @var{400})
+The character width at which backtraces of Guile processes launched by
+the Guix daemon should be truncated.
+
@item @code{build-group} (default: @code{"guixbuild"})
Name of the group for build user accounts.
modified gnu/services/base.scm
@@ -187,6 +187,7 @@ (define-module (gnu services base)
guix-configuration?
guix-configuration-guix
+ guix-configuration-backtrace-width
guix-configuration-build-group
guix-configuration-build-accounts
guix-configuration-authorize-key?
@@ -1634,6 +1635,8 @@ (define-record-type* <guix-configuration>
(default 0))
(timeout guix-configuration-timeout ;integer
(default 0))
+ (backtrace-width guix-configuration-backtrace-width ;integer
+ (default 400))
(log-compression guix-configuration-log-compression
(default 'gzip))
(discover? guix-configuration-discover?
@@ -1701,7 +1704,7 @@ (define (guix-shepherd-service config)
(guix build-group build-accounts authorize-key? authorized-keys
use-substitutes? substitute-urls max-silent-time timeout
log-compression discover? extra-options log-file
- http-proxy tmpdir chroot-directories)
+ http-proxy tmpdir chroot-directories backtrace-width)
(list (shepherd-service
(documentation "Run the Guix daemon.")
(provision '(guix-daemon))
@@ -1771,6 +1774,9 @@ (define discover?
(list (string-append "TMPDIR=" tmpdir))
'())
+ #$(string-append "COLUMNS=" (number->string
+ backtrace-width))
+
;; Make sure we run in a UTF-8 locale so that
;; 'guix offload' correctly restores nars
;; that contain UTF-8 file names such as
--8<---------------cut here---------------end--------------->8---
But it doesn't seem to work :-(.
> which reminds me that a project-wide logging infrastructure would also
> greatly elevate the guix debugging experience.
I wouldn't be against having a logging system in Guix; there's a readily
available logging library part of guile-lib; see info '(guile-library)
loggig logger')
--
Thanks,
Maxim
- Re: Guile debugger workgroup?, (continued)
Re: Guile debugger workgroup?, zimoun, 2022/11/27
Re: Guile debugger workgroup?, Attila Lendvai, 2022/11/27
Re: Guile debugger workgroup?,
Maxim Cournoyer <=
Re: Guile debugger workgroup?, Joshua Branson, 2022/11/28
Re: Guile debugger workgroup?, Ludovic Courtès, 2022/11/28
Re: Guile debugger workgroup?, Attila Lendvai, 2022/11/28
Re: Guile debugger workgroup?, Ludovic Courtès, 2022/11/29
Re: Guile debugger workgroup? (was: Coding style: similarly-named variables), Csepp, 2022/11/28
Re: Guile debugger workgroup?, Jannneke Nieuwenhuizen, 2022/11/30