From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sPaLIpMev2HtEAEAgWs5BA (envelope-from ) for ; Sun, 19 Dec 2021 12:59:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CGhsHpMev2EFFQAAB5/wlQ (envelope-from ) for ; Sun, 19 Dec 2021 11:59:15 +0000 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 2CC5A2018F for ; Sun, 19 Dec 2021 12:59:15 +0100 (CET) Received: from localhost ([::1]:41098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myuqP-0000NE-QA for larch@yhetil.org; Sun, 19 Dec 2021 06:59:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myuqF-0000MP-3E for bug-guix@gnu.org; Sun, 19 Dec 2021 06:59:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1myuqE-0004mE-R4 for bug-guix@gnu.org; Sun, 19 Dec 2021 06:59:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1myuqE-0003Cn-Qt for bug-guix@gnu.org; Sun, 19 Dec 2021 06:59:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52577: =?UTF-8?Q?=E2=80=98guix_?= =?UTF-8?Q?lint=E2=80=99?= throws an ugly backtrace if the GitHub updater receives =?UTF-8?Q?=E2=80=9Crate?= limit =?UTF-8?Q?exceeded=E2=80=9D?= error Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 19 Dec 2021 11:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52577 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Xinglu Chen , 52577@debbugs.gnu.org Received: via spool by 52577-submit@debbugs.gnu.org id=B52577.163991511012257 (code B ref 52577); Sun, 19 Dec 2021 11:59:02 +0000 Received: (at 52577) by debbugs.gnu.org; 19 Dec 2021 11:58:30 +0000 Received: from localhost ([127.0.0.1]:45000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myuph-0003Bd-Sc for submit@debbugs.gnu.org; Sun, 19 Dec 2021 06:58:30 -0500 Received: from xavier.telenet-ops.be ([195.130.132.52]:45946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myupf-0003BE-ES for 52577@debbugs.gnu.org; Sun, 19 Dec 2021 06:58:28 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by xavier.telenet-ops.be with bizsmtp id YByR260024UW6Th01ByRKC; Sun, 19 Dec 2021 12:58:25 +0100 Message-ID: <80e40710ed0814ecded0d7f153d1e1ef6e30a311.camel@telenet.be> From: Maxime Devos Date: Sun, 19 Dec 2021 11:58:25 +0000 In-Reply-To: <87sfurhru8.fsf@disroot.org> References: <87bl1fjpl3.fsf@disroot.org> <746d29cab94d0a8686283a896cd2f639523e9d5d.camel@telenet.be> <87sfurhru8.fsf@disroot.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1639915105; bh=Hn9mp0eJczWtHCnmBuHLk95wBxzsdlTLlaW+RbYV5M4=; h=Subject:From:To:Date:In-Reply-To:References; b=Hwlzsxp65+6E0E8uARD5qVsdQEfu+4mP6WVzE5PGuY4n1Pbx27HDKWEoWykQQCPkL bNhnjOWVqxLoajE6tSRWsGbB547A1ag89VlXN/PLTmHdTvccbFjwh9r23SE5Kx8PuY qAcynwpHNDoAIVesndQn3EgLMaI/8WJj29U3PBV4iFeWsb/he7pU3635kYtUlE+EHi GPlNHvWMOThjv0jJGvbGos6EBjDtNR9SgUrdDMqoQuVxMiWlf3UrRxNcpvr3+InIz2 iry6gaQbYI22+gP54be0qm3/0Op4vTi4kHQWjr5x87vASfAUAbQY99msjBbivqpuNO np+mqoIwl7Amg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" 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=1639915155; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Hn9mp0eJczWtHCnmBuHLk95wBxzsdlTLlaW+RbYV5M4=; b=FiW7cQO/BNF4T1Gh52FU4ZjcDmDZtDjczjZRlDTz4SXA240S96DiOXOiAXR8oQLdf+PX0J bZaWdXCGByfpLTkRLymuRm3KKRfurVAYaHB75nUJAug15EL7T7Gum9ghfN+40F5WCSAhd1 UE5+WPrxtKp9OfsBM2fRPUtj5YfeFVn56UGgCSLI3J4pB/DbnCm228DSrZN41B4WjIqi9y al+cyQMf0ktbQD9y9G8h0jLlVx4gbjeTXJWsanYc1+lKY3ug69uQKOx098aF2odwUt4dSi J/x4j91umuu2Rjpmgg2c/f5kavJODEGu4pbf7pZJ9QzMOWhpWYOxltGog0A7hg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639915155; a=rsa-sha256; cv=none; b=ZTUQxST1nZ76J/mz9XfjOVGa8hRq1Ke296/XTmYHBCpURqcYvj3wc7Iou7UsNCdMWDllqX LB2iwqdU9cpyxJWhi5ObHuYH0JiKPhKUu5d6cQBak5o2kN4gYpFtMmQ181SOBhSUjWKHS6 KNm2Ic+q9B5UntGck8k/wnh6pbD8ZPjRXo9dE6qZPLFn+FOYiySn07pLXWlpsNxkesSDlO qm6Ou+fLildLl62CPvz3kksfnlTRFO+Kr+DYfF512JVMwyd+3wiVhmisfu3ISy+T+i6/yZ BuDcfxwhOS27b2n6ystQ3sJMuNppgTb5N6dhbfGh1iMe4bU1NezH69us+S325g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=Hwlzsxp6; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=Hwlzsxp6; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2CC5A2018F X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: cxUzsJR2BMom Xinglu Chen schreef op vr 17-12-2021 om 21:57 [+0100]: > On Fri, Dec 17 2021, Maxime Devos wrote: > > > Xinglu Chen schreef op vr 17-12-2021 om 15:03 [+0100]: > > > (guard (c ((and (http-get-error? c) > > >                 (string=? "rate limit exceeded" > > >                           (http-get-error-reason c))) > > >            (warning (G_ "GitHub rate limit exceeded")) > > >            #f)) > > >   (with-networking-fail-safe ...)) > > > > Shouldn't this be wrapped the other way around? > > Or maybe even move the http-get-error?+string=?+warning inside > > call-with-networking-fail-safe? > > Thanks for the pointer, it seems that ‘throw’ in > ‘call-with-networking-fail-safe’ wraps the original exception an > additional ‘&compound-exception’.  Before the ‘throw’, the exception > looks like this: > > --8<---------------cut here---------------start------------->8--- > (%exception #<&compound-exception components: (#<&http-get-error uri: > #< scheme: https userinfo: #f host: "api.github.com" port: #f > path: "/repos/PipeWire/pipewire/releases" query: #f fragment: #f> > code: 403 reason: "rate limit exceeded"> #<&message message: " > https://api.github.com/repos/PipeWire/pipewire/releases: HTTP > download failed: 403 (\"rate limit exceeded\")">)>) > --8<---------------cut here---------------end--------------->8--- > > After the ‘throw’, it becomes this: > > --8<---------------cut here---------------start------------->8--- > #<&compound-exception components: (#<&error> #<&irritants irritants: > (#<&compound-exception > components: (#<&http-get-error uri: #< scheme: https userinfo: > #f host: > "api.github.com" port: #f path: "/repos/PipeWire/pipewire/releases" > query: #f fragment: #f> > code: 403 reason: "rate limit exceeded"> #<&message message: > "https://api.github.com/repos/PipeWire/pipewire/releases: HTTP > download failed: 403 (\"rate > limit exceeded\")">)>)> #<&exception-with-kind-and-args kind: > %exception args: > (#<&compound-exception components: (#<&http-get-error uri: #< > scheme: https userinfo: > #f host: "api.github.com" port: #f path: > "/repos/PipeWire/pipewire/releases" query: #f > fragment: #f> code: 403 reason: "rate limit exceeded"> #<&message > message: > "https://api.github.com/repos/PipeWire/pipewire/releases: HTTP > download failed: 403 (\"rate > limit exceeded\")">)>)>)> > --8<---------------cut here---------------end--------------->8--- > > This means that the ‘guard’ form in ‘call-with-networking-fail-safe’ > is > never going to match anything since the real exception will always be > nested > in another ‘&compound-exception’. Actually, being wrapped in &compound-exception shouldn't be a problem: &compound-exception just means that the exception is of multiple types, e.g. both &message and &http-get-error or something like that. In that case, the exception could be both message? and http-get-error?. I think the problem is, that for some unknown reason, the &http-get-error/&message exception gets wrapped in a &exception-with-and-args --- I guess there's a bad interaction with the throw/catch exception handling system and the raise/guard system, because only 'system-error'/'tls-certificate-error'/...-style exceptions should get wrapped in a &exception-with-kind-and-arguments. Greetings, Maxime