From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eG0DMAXJhWMfBgEAbAwnHQ (envelope-from ) for ; Tue, 29 Nov 2022 09:55:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8BEPMAXJhWPbhwAA9RJhRA (envelope-from ) for ; Tue, 29 Nov 2022 09:55:33 +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 9DF3C3C039 for ; Tue, 29 Nov 2022 09:55:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozwOK-00025u-Hp; Tue, 29 Nov 2022 03:55:00 -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 1ozwOI-00025I-SY for guix-devel@gnu.org; Tue, 29 Nov 2022 03:54:59 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozwOI-0005ot-4W; Tue, 29 Nov 2022 03:54:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=lOTjZOrYDg16J0NI/eNbPAY4iQlNtHL7U5g15D+JUCI=; b=A67lGNG3VdvNXdJZlKke u97zfKzjASxaG+fyzIhLYI60RUps499n7inWdEP95BYF6zPTPelgvpkvD+AG9ywr8OyDKERqvTJi7 FgbDACFbgY4Lr1V09Tkxj35E3W5MG9V6Y9Q0eUcR+ZNJ7+p58NQGGtKnB1oPNmfhz0tl4J30Yhxib x0J20hY2TVGfRpPtdT9YZI/Ji7vbn0cHc7JjXebtfSHf1xz9x9bHvKBo5BtMMvFS1PRi9gZuo6Krk 0ScbPSC1cPeSsNZKRF8gJM+l+Oynv7V88TkOmOZAKVSJ/k545oiZUUdmr8lxGeZeB+BSnFOJHXbcS TkRaXPS4fPYCjQ==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozwOH-0001wh-81; Tue, 29 Nov 2022 03:54:57 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Attila Lendvai Cc: Maxim Cournoyer , zimoun , guix-devel Subject: Re: Guile debugger workgroup? References: <20221027035100.28852-1-maxim.cournoyer@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> <87h6yje3op.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Nonidi 9 Frimaire an 231 de la =?utf-8?Q?R=C3=A9volu?= =?utf-8?Q?tion=2C?= jour du =?utf-8?Q?Geni=C3=A8vre?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 29 Nov 2022 09:54:54 +0100 In-Reply-To: (Attila Lendvai's message of "Mon, 28 Nov 2022 14:12:11 +0000") Message-ID: <87a64a6syp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=1669712133; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=lOTjZOrYDg16J0NI/eNbPAY4iQlNtHL7U5g15D+JUCI=; b=bW6eKM35sH17SX4N5IdwSQUQQpTXhWx8us8imvCDfydTuIqfNX860pzdI1byKGbikEWnK4 tAMTplxn52G3hIpqaNEoeljFtN7YNRsGRbl2EwV8yUQnaVWkv0AcfQCmwBDr/60WzSNMiH pi1KXjFZ5aKOTDFm3uJHZMX0LJrwipdR1uVQwn7U6Zgi38RW2Ru4mk6p2kBRdPtbJi8NRD LqpgmbJpZl/4HVj+GDjbKyp+AfXjonOqWEbICQUSQ5pR4YoG9mA73/3gOcGj0IiYqbyMdS 4pQVLXWw4kStRGl0eSe8z5q0yutKVuaLMKCwQ7hRy+d3Ent22Q+Mv9Do4rlkAA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669712133; a=rsa-sha256; cv=none; b=aV5avuXDchOCTAjZreaNNkLLsQaWNRrSY3plxSIYcUGvjQAPETYN9Cgx9wLxRWdMIyEVDg arGhOXhyk55PNYMN1MlK3JdrxXAn6BsEm8jIdwr0f9N4m8IVFHeWiCJAuLwiLV4NSC5+nt y+49oWIpRcFUFKuLKZG9xLKqtay+rkbFwoZRz9o4kZz5D+ZJn8Bhs4KKSKklSYWpueyHYT 10CRlGuXLdTjZD9svpc1HWXQzo02xfPCG5mV4ZwteR6BAlQpeGYKkdGYcRfZzr/UxwvW31 tqSoId5fZhIkfiOpIXoAS30rTJuOEBHWwrJowO0yHSk9KAP49OZeqRWmVj6ngg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=A67lGNG3; dmarc=pass (policy=none) header.from=gnu.org; 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: -2.66 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=A67lGNG3; dmarc=pass (policy=none) header.from=gnu.org; 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: 9DF3C3C039 X-Spam-Score: -2.66 X-Migadu-Scanner: scn0.migadu.com X-TUID: B+vZOePtR0ug Hi, Attila Lendvai skribis: > the first thing that pops to my mind is the service start gexp's in sheph= erd: they felt impossible to debug. i often was pretty much resorting to st= aring at the code, and then trying ad-hoc changes (with a minute+ long edit= -compile-test cycle). Ah yes. That=E2=80=99s a problem that has to do with staging, which makes things more difficult. The one multi-stage language I know of that did it well, but in a totally different context, is Hop . briefly discusses cross-stage debugging. > there are multiple issues here. the first one is that there's no proper e= rror handling in shepherd. but if there was at least a semi-global error ha= ndler, that logged a full backtrace into a log file, then it would have bee= n immensely helpful. OK. I guess there are cases where you do get logging with Shepherd 0.9, and other cases less so (e.g., if the =E2=80=98start=E2=80=99 method refers= to an unbound variable). We should look at typical examples to get a better understanding of what=E2=80=99s missing. > for inspiration, this is what we developed in common lisp: > > https://hub.darcs.net/hu.dwim/hu.dwim.util/browse/source/error-handling.l= isp#10 > > WITH-LAYERED-ERROR-HANDLERS is a macro for which you can provide a "level= 1" error handler hook that does whatever it wants. if any errors happen wi= thin this hook, then a level2 error handler kicks in, turns off several thi= ngs (e.g. custom PRINT-OBJECT methods), and tries to log a backtrace in a d= efensive way (e.g. there are error handlers installed while printing each b= acktrace level). > > if even level2 errors out, then a super conservative level3 error handler= logs this fact, so that there's *some* sign of an error. Looks like a good source of inspiration! Thanks, Ludo=E2=80=99.