From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0K2iEfX/l2GkZQEAgWs5BA (envelope-from ) for ; Fri, 19 Nov 2021 20:50:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6CmCDPX/l2FmYgAA1q6Kng (envelope-from ) for ; Fri, 19 Nov 2021 19:50:13 +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 D42E59179 for ; Fri, 19 Nov 2021 20:50:12 +0100 (CET) Received: from localhost ([::1]:36434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo9tj-0003lX-Hn for larch@yhetil.org; Fri, 19 Nov 2021 14:50:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo9ta-0003k6-J2 for guix-patches@gnu.org; Fri, 19 Nov 2021 14:50:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:57258) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo9ta-0008D7-9C for guix-patches@gnu.org; Fri, 19 Nov 2021 14:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mo9ta-0005DT-5d for guix-patches@gnu.org; Fri, 19 Nov 2021 14:50:02 -0500 Subject: bug#51091: [PATCH v3] guix: opam: Do not fail when refreshing. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Fri, 19 Nov 2021 19:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 51091 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51091-close@debbugs.gnu.org Mail-Followup-To: 51091@debbugs.gnu.org, julien@lepiller.eu, julien@lepiller.eu Received: via spool by 51091-done@debbugs.gnu.org id=D51091.163735135619978 (code D ref 51091); Fri, 19 Nov 2021 19:50:01 +0000 Received: (at 51091-close) by debbugs.gnu.org; 19 Nov 2021 19:49:16 +0000 Received: from localhost ([127.0.0.1]:40571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mo9sp-0005CA-UW for submit@debbugs.gnu.org; Fri, 19 Nov 2021 14:49:16 -0500 Received: from lepiller.eu ([89.234.186.109]:39372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mo9sn-0005Bw-VV for 51091-close@debbugs.gnu.org; Fri, 19 Nov 2021 14:49:15 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id d9721b95 for <51091-close@debbugs.gnu.org>; Fri, 19 Nov 2021 19:49:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=TGoKgEa1ywIy GxkzB9JUQlcBLoNcyl74gjtkGrhOLuQ=; b=X/fNOuWW+ldZnr4G81ZkBp2q+lVT PIc9o28fJB+ufYOy44IzGBiHcvj/wGQRMFi9b+Zcui+ed1ibDaJEahe2V7FSrn12 1+IRyOv0q8AHlVXcMCkLz4XlIadmIyl3yVE8jFOfCS1g4trlasPhYjxDEXaqNUBg ffi+K90KWbEperejJbabUNoJ/IrOUBRdN/l7XOY94GXT8x5rpMehISPivSYwXvcD PLApby2oTjMIsaZzO23gsIFVA1mUV58D0O0RnfZ/NjQ2F/c8gKzHETN/r10+KeUy O1vwaXgfrh8rPB1N1NpD+2xNtEH2/Aed5fN1OkB2bJprWb5pST/J4janMw== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 2a2f4a0e (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for <51091-close@debbugs.gnu.org>; Fri, 19 Nov 2021 19:49:09 +0000 (UTC) Date: Fri, 19 Nov 2021 14:49:02 -0500 From: Julien Lepiller User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----HOVZZ5WZA6K42FWIWZXJJR192TO4NF Content-Transfer-Encoding: 7bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" 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=1637351413; 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-to: 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=NMx5NNkCQtDde/4wLf3ufPJNU0gEJIiD3tgtsi95im8=; b=lTmMJ2GotkMU4seq8RsGVMgqLUsTmti6hDIWWbsViaZhq4m0vQiCcEnA7Zbc4nVin0FRXl 8CASFE9YHNCSbUa/RqEw8ubKbqA/80+t5RuDPFY95rPerKLQzneCzlQsR3pBHbnp2esshv K2rll6Nbs086buz8tDcDC/ko/V4cFDxTSn6nUxOlkpLS9hZXwpI+2IkfFBC/mRn/bWqWMD /RZs/IAIF9vSZbw9xUbMhStr/bxBKWORPtnYC03qYJxAX+SpfVTbH8vCNkOhQSbdWxeV0u o7tg8F/Oon3ss45vDRBl4K4xpRrNj+il8174hew39TnqLWiWUC6xQjfW2L6fUw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637351413; a=rsa-sha256; cv=none; b=SLrUGfOEet+GF4CzlWTXnt2qk1QTZe9CD64X4M+aECe7mxfKrkYzerguyiepMgX2po25hf X9FPwLcEkIOeiB3Iv6EVC1jiF5BWONr9VskHIS84QYwFJa17FoQ8AQzuss30t9FsJ2q/PU jP6F/nlDwSlKd3/tWdK224lKjTHxXDIDecEBJ85FsCQ311rQV7h3JNFWAgDzdRrVY865Ye QY8CcU5my45U/V+dCiU9ya9bqvnJiGS3acWLzs0xZ3eacA0OaD6yc/BOI5Y+fPdVFUbGWS c155/RwhwKWReMoiuFsWFs8TYhxFYi5GQs5k019V7WM002NUTBahPFEMqCr/Nw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b="X/fNOuWW"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.87 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b="X/fNOuWW"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D42E59179 X-Spam-Score: -1.87 X-Migadu-Scanner: scn0.migadu.com X-TUID: b+OG2mcl7FvV ------HOVZZ5WZA6K42FWIWZXJJR192TO4NF Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Forgot to send to the address that actually closes the issue ^^" -------- Courriel d=E2=80=99origine -------- De=C2=A0: Julien Lepiller Envoy=C3=A9=C2=A0: 19 novembre 2021 13:13:08 GMT-05:00 =C3=80=C2=A0: zimoun Cc=C2=A0: "Ludovic Court=C3=A8s" , Xinglu Chen Objet=C2=A0: Re: [bug#51091] [PATCH v3] guix: opam: Do not fail when refre= shing=2E So, since I pushed Zimoun's patch, I'm closing this one=2E I received some= help on IRC this morning so I should be able to come up with something mor= e generic for all importers at some point=2E Zimoun if you want to work on = that, I'd be happy to collaborate :) Le 19 novembre 2021 06:30:20 GMT-05:00, zimoun a =C3=A9crit=C2=A0: >Hi Julien, > >On Fri, 19 Nov 2021 at 12:21, Julien Lepiller wrot= e: > >> >> I forgot to remove the catch #t around the whole body of the functio= n=2E >> >> I noticed that guard* was raising &non-continuable so I tried to fix= it >> >> by using raise-continuable from (ice-9 exceptions)=2E Is this the co= rrect >> >> solution? >> > >> >I suppose, though I=E2=80=99m not sure why it needs to be continuable:= you could >> >just catch the exception and move on to the next package? >> >> I don't understand how to catch the exception though, unless you mean w= rap everything with catch #t, which kinda defeats the purpose of having a c= ondition in the first pjace=2E guard* raises &non-continuable unless the co= ndition is continuable, or I'm missing something in the way I use it=2E I h= ave no idea what a continuable exception is, so let me just push the other = patch=2E >> >> (guard* (c ((opam-error? c) #f))) >> (raise (condition (&opam-error =E2=80=A6)))) >> >> Doesn't return #f as I expect, but raises &non-continuable=2E > >I sympathize and I had / is still having hard time with similar use >cases=2E That's one of the reasons (among my laziness :-)) that [1] is >not fixed yet=2E :-) > >1: <1: > > > >> Hopefully someone smarter than me can figure it out=2E I'll push the ot= her patch, although I don't like the double warning in the updater=2E > >I agree=2E And move all G_ strings to guix/scripts/ is a good idea, IMHO= =2E >Well, I do not know=2E :-) > >(I secretly hoped that you would be the smarter than me person fixing >the recursive importers=2E ;-)) > > >Cheers, >simon ------HOVZZ5WZA6K42FWIWZXJJR192TO4NF Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Forgot to send to the address that actually closes= the issue ^^"



De=C2=A0: Julien Lepiller <julien@lepiller=2Eeu>
Envoy=C3=A9=C2=A0: 19 novembre 2021 13:13:08 GMT-05:00
=C3=80=C2=A0: zimoun <zimon=2Etoutoune@gmail=2Ecom>
Cc=C2=A0: "Ludovic Court=C3=A8s" <ludo@gnu=2Eorg>, Xinglu Che= n <public@yoctocell=2Exyz>
Objet=C2=A0: Re: [bug#51091] [PATCH v3] guix: opam: Do not fail whe= n refreshing=2E

So, since I pushed Zimoun's patch, I'm closing this one=2E I received some= help on IRC this morning so I should be able to come up with something mor= e generic for all importers at some point=2E Zimoun if you want to work on = that, I'd be happy to collaborate :)

Le 1= 9 novembre 2021 06:30:20 GMT-05:00, zimoun <zimon=2Etoutoune@gmail=2Ecom= > a =C3=A9crit=C2=A0:
Hi Julien,

On Fri, 19 Nov 2021 a= t 12:21, Julien Lepiller <julien@lepiller=2Eeu> wrote:

I forgot t= o remove the catch #t around the whole body of the function=2E
I noticed= that guard* was raising &non-continuable so I tried to fix it
by us= ing raise-continuable from (ice-9 exceptions)=2E Is this the correct
sol= ution?

I suppose, though I=E2=80=99m not sure why it ne= eds to be continuable: you could
just catch the exception and move on to= the next package?

I don't understand how to catch the= exception though, unless you mean wrap everything with catch #t, which kin= da defeats the purpose of having a condition in the first pjace=2E guard* r= aises &non-continuable unless the condition is continuable, or I'm miss= ing something in the way I use it=2E I have no idea what a continuable exce= ption is, so let me just push the other patch=2E

(guard* (c ((opam-= error? c) #f)))
(raise (condition (&opam-error =E2=80=A6))))
<= br> Doesn't return #f as I expect, but raises &non-continuable=2E

I sympathize and I had / is still having hard time with simi= lar use
cases=2E That's one of the reasons (among my laziness :-)) that= [1] is
not fixed yet=2E :-)

1: <1: <http://issues=2Eguix=2Egnu=2Eorg/issue/4= 5984>