all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Attila Lendvai <attila@lendvai.name>
Cc: "Ludovic Courtès" <ludo@gnu.org>,
	zimoun <zimon.toutoune@gmail.com>,
	guix-devel <guix-devel@gnu.org>
Subject: Re: Guile debugger workgroup?
Date: Sun, 27 Nov 2022 21:06:34 -0500	[thread overview]
Message-ID: <87a64bvnmd.fsf@gmail.com> (raw)
In-Reply-To: <dfRd5awxp0tE8QfRuKbFqu5liSzDns0MkGiyUmWh27NqWmmG73Sb77wUN4U5iJylucW8wkL8DEkS73dt45g22etwlRWtIrT8tLZ4r2fO63E=@lendvai.name> (Attila Lendvai's message of "Sun, 27 Nov 2022 20:46:36 +0000")

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


  parent reply	other threads:[~2022-11-28  2:07 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27  3:41 [bug#58812] [PATCH 0/5] Add --symlink option to 'guix shell' Maxim Cournoyer
2022-10-27  3:50 ` [bug#58812] [PATCH 1/5] Makefile.am: Sort EXTRA_DIST entries Maxim Cournoyer
2022-10-27  3:50   ` [bug#58812] [PATCH 2/5] tests: Add a tests/utils.sh support file Maxim Cournoyer
2022-11-09 21:07     ` [bug#58812] [PATCH 0/5] Add --symlink option to 'guix shell' Ludovic Courtès
2022-11-10  3:38       ` Maxim Cournoyer
2022-11-10  4:23       ` [bug#59164] [PATCH v2 1/4] Makefile.am: Sort EXTRA_DIST entries Maxim Cournoyer
2022-11-10  4:23         ` [bug#59161] [PATCH v2 2/4] install: Validate symlink target in evaluate-populate-directive Maxim Cournoyer
2022-11-10  4:23         ` [bug#59162] [PATCH v2 3/4] guix: shell: Add '--symlink' option Maxim Cournoyer
2022-11-10  4:23         ` [bug#59163] [PATCH v2 4/4] shell: Detect --symlink spec problems early Maxim Cournoyer
2022-10-27  3:50   ` [bug#58812] [PATCH 3/5] install: Validate symlink target in evaluate-populate-directive Maxim Cournoyer
2022-11-09 21:06     ` [bug#58812] [PATCH 0/5] Add --symlink option to 'guix shell' Ludovic Courtès
2022-11-10  3:37       ` Maxim Cournoyer
2022-11-17 17:37         ` [bug#59164] Coding style: similarly-named variables Ludovic Courtès
2022-11-17 18:44           ` [bug#58812] " zimoun
2022-11-18 17:02             ` Maxim Cournoyer
2022-11-21 15:02               ` zimoun
2022-11-21 15:52                 ` [bug#59164] " zimoun
2022-11-21 20:55                 ` Maxim Cournoyer
2022-11-22 14:35                   ` [bug#59164] " zimoun
2022-11-25 15:23                     ` Guile debugger workgroup? (was: Coding style: similarly-named variables) Maxim Cournoyer
2022-11-26 11:22                       ` Guile debugger workgroup? Ludovic Courtès
2022-11-27  3:16                         ` Maxim Cournoyer
2022-11-28 10:53                           ` Ludovic Courtès
2022-11-28 13:41                             ` Attila Lendvai
2022-11-28 14:50                               ` Maxim Cournoyer
2022-11-29  8:46                               ` Ludovic Courtès
2022-11-30  3:44                                 ` Attila Lendvai
2022-11-27 12:04                         ` zimoun
2022-11-28  0:27                           ` Maxim Cournoyer
2022-11-28 11:06                           ` Ludovic Courtès
2022-11-28 12:31                             ` zimoun
2022-11-27 20:46                         ` Attila Lendvai
2022-11-28  0:41                           ` David Pirotte
2022-11-28  0:45                             ` David Pirotte
2022-11-28  2:06                           ` Maxim Cournoyer [this message]
2022-11-28  7:22                             ` Joshua Branson
2022-11-28 11:09                           ` Ludovic Courtès
2022-11-28 14:12                             ` Attila Lendvai
2022-11-29  8:54                               ` Ludovic Courtès
2022-11-28 12:24                       ` Guile debugger workgroup? (was: Coding style: similarly-named variables) Csepp
2022-11-30  7:09                       ` Guile debugger workgroup? Jannneke Nieuwenhuizen
2022-11-26 14:47                     ` [bug#58812] [bug#59164] Coding style: similarly-named variables Ludovic Courtès
2022-11-17 20:34           ` Maxim Cournoyer
2022-11-20 10:46             ` [bug#58812] " Ludovic Courtès
2022-10-27  3:50   ` [bug#58812] [PATCH 4/5] guix: shell: Add '--symlink' option Maxim Cournoyer
2022-11-09 20:58     ` [bug#58812] [PATCH 0/5] Add --symlink option to 'guix shell' Ludovic Courtès
2022-11-10  3:10       ` Maxim Cournoyer
2022-11-10 14:17         ` Ludovic Courtès
2022-11-10 14:49           ` Maxim Cournoyer
2022-11-10 15:16             ` Maxim Cournoyer
2022-11-14  9:18               ` Ludovic Courtès
2022-11-10 16:05           ` [bug#58812] [PATCH v3 1/4] Makefile.am: Sort EXTRA_DIST entries Maxim Cournoyer
2022-11-10 16:05             ` [bug#58812] [PATCH v3 2/4] install: Validate symlink target in evaluate-populate-directive Maxim Cournoyer
2022-11-10 16:05             ` [bug#58812] [PATCH v3 3/4] guix: shell: Add '--symlink' option Maxim Cournoyer
2022-11-10 16:05             ` [bug#58812] [PATCH v3 4/4] shell: Detect --symlink spec problems early Maxim Cournoyer
2022-11-16 19:03       ` [bug#58812] [PATCH 0/5] Add --symlink option to 'guix shell' zimoun
2022-11-16 19:34         ` Maxim Cournoyer
2022-10-27  3:51   ` [bug#58812] [PATCH 5/5] shell: Detect --symlink spec problems early Maxim Cournoyer
2022-11-15 21:24 ` bug#58812: [PATCH v3 1/4] " Maxim Cournoyer

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a64bvnmd.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=attila@lendvai.name \
    --cc=guix-devel@gnu.org \
    --cc=ludo@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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.