From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 5oNAIecXhGO8ZgEAbAwnHQ (envelope-from ) for ; Mon, 28 Nov 2022 03:07:35 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cCZ2IOcXhGM5wAAA9RJhRA (envelope-from ) for ; Mon, 28 Nov 2022 03:07:35 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2F5BB3E18E for ; Mon, 28 Nov 2022 03:07:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozTY0-0005lI-1G; Sun, 27 Nov 2022 21:07:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozTXx-0005l5-U5 for guix-devel@gnu.org; Sun, 27 Nov 2022 21:07:01 -0500 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ozTXw-0001my-Am; Sun, 27 Nov 2022 21:07:01 -0500 Received: by mail-qk1-x72e.google.com with SMTP id x21so6347271qkj.0; Sun, 27 Nov 2022 18:06:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=fTrE4yo5taGTmtHsQNL4PdhTum6HxvpiXrbNo0U6YbA=; b=amxC9o8B9Hcy5mUNt+DBz3HsFuIz/abm9vcIvoAN9Um1OwGcOwFX3TSqOj0JyvrJC7 kKR2AbaLsyzKYl17YcVclwVFMEDrNasfUqWLcamaHkX/qEreGA4VJugWYgfYXCm8bp0G JuLG/I4HuJDf4QYZkEsM2m10Fh4yrBqwTqiDvDPkVY/2qKYYPXDi7TxU2h3StVEZVs4L rEcn7LyoRA7i12Fmb9JqFEnl0ESCIlui2HdY+IxxydiSLCXRxUkQtnjrSO1M8515eTzh qiI16lhL02JEj9AX0zqVHOuIfIdqpM3esLHWTgykWmHdI9Gcp972rSrlwqEfOrvGRuqC c0Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fTrE4yo5taGTmtHsQNL4PdhTum6HxvpiXrbNo0U6YbA=; b=xAjZudzNudArgmaWxI70yLODv6xYvhLQ4Xg/fqCMEGzRslNZ8hr1KJzR514jr87d6O QgIQpBybt9XSLeoISrUX5y/Cd1Hqrt18Ikz8JGkSaQBmjdtHB0SVwTAZAy/WHu6AjEUD 6NgSySwF7ppr3b8nAtsSgBWtB8MkeDwquOzVdZ8tKXuyU+ipRCprHwyHGwHk6riqw4Zq XfXaVYbiMvtdh5VbwaY3osFy+7dJl1KV9qUl5CPU0sOk86KzeMQbDj4zkm6iqHQTXipn oH6jllOED8v6i01Z1kXbCppl7yyeXjWv0Ss7YpIV/XeUSRcEkw8PUOQuLDd6Uv/HCxpf Xh2g== X-Gm-Message-State: ANoB5plaxFMfAGHal+n9+5ewkwaIdFrTQ6EMH00frLpvvfkq0/VDZ6kd tWrglzBxbYspSel3rz47bt0zDdIYAjs= X-Google-Smtp-Source: AA0mqf7A+12kUsVCOqaxuv4s4ZFjQXH6p66MVTXQVIXn2/6ZElROGlTyc2PgA9x3YxosRqR6kAb+5w== X-Received: by 2002:a05:620a:899:b0:6ee:870b:2b68 with SMTP id b25-20020a05620a089900b006ee870b2b68mr44417305qka.419.1669601195737; Sun, 27 Nov 2022 18:06:35 -0800 (PST) Received: from hurd (dsl-151-252.b2b2c.ca. [66.158.151.252]) by smtp.gmail.com with ESMTPSA id do39-20020a05620a2b2700b006cdd0939ffbsm7377769qkb.86.2022.11.27.18.06.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Nov 2022 18:06:35 -0800 (PST) From: Maxim Cournoyer To: Attila Lendvai Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , zimoun , guix-devel Subject: Re: Guile debugger workgroup? References: <20221027035100.28852-1-maxim.cournoyer@gmail.com> <87sfihfpng.fsf_-_@gnu.org> <86zgcpju9p.fsf@gmail.com> <87y1s82o23.fsf@gmail.com> <87zgckwdtw.fsf@gmail.com> <87sficqb71.fsf@gmail.com> <86fsebdpl9.fsf@gmail.com> <87r0xrjbx1.fsf_-_@gmail.com> <87fse69czr.fsf@gnu.org> Date: Sun, 27 Nov 2022 21:06:34 -0500 In-Reply-To: (Attila Lendvai's message of "Sun, 27 Nov 2022 20:46:36 +0000") Message-ID: <87a64bvnmd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::72e; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x72e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669601255; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=fTrE4yo5taGTmtHsQNL4PdhTum6HxvpiXrbNo0U6YbA=; b=TErhV1uI68sTTHH6hLMlBmqjUPBXx0govfGbUsXEyz/PiScIFYh342VtJaAVh6G0y1OJMR 7ZN71ZEmfHDkNAoRhrZHtzyQ0Oju6c0gtcHhPi0x21c4UleX+gx8L/4VAoe27SrjBR3+Dh fZBfQBEPb+uMQuCvv8TmbpoPxkNYJLK31BWHyejG5deNYpv4BBkYXI8MWLAjIokfAwIhch wUxMyNEjm6lj6liOvDwKeSuVw92COpRLDmD1H+ZS3P3qGdyQtsFtQNoBi24aBnhyWql46s W4+O23ukcD8b+c7REtaWAwqN+Y1LIUYRPYFbjNjHqC0r1DMl79cEucrSNbQBGA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669601255; a=rsa-sha256; cv=none; b=GIUJAqHJtOxjKU5rhdtWSDuWUH3PNzZCLHhGZCySxRrYa4ufSDG1HKwg2m25q7sn94VNIU M+FtAczFWG1r8uVz5mY1GR6Y5W3WXsYC8wwNw+GQ1PZRUxlxWUKR5TNzI+k+J847iiE8R1 A97oqCaq5DHcMrl10YqD1FkH438YI1w3IeHYffoh7Bh/tXMEyfkqdZ0w8lMjbPoR/ODAyx cR3KiJVWvbtRDCZXt80i5+BdB8M5xV050t8MKzRUTzHAqua51cCP89FSMIrTn4TWta7+Cq uV24MYU1Wy6uxw40VeUHtn1R6w+puxzSMt62PD7Xiska/kSqZ0iS4LWUrF1DjA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=amxC9o8B; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.76 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=amxC9o8B; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2F5BB3E18E X-Spam-Score: -6.76 X-Migadu-Scanner: scn0.migadu.com X-TUID: nRjbjTxRctsl Hi Attila, Attila Lendvai 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* (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