GNU bug report logs - #74542
[PATCH 00/11] Improved tooling for package updates

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Tue, 26 Nov 2024 10:33:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Simon Tournier <zimon.toutoune <at> gmail.com>
Cc: Christopher Baines <guix <at> cbaines.net>, Josselin Poiret <dev <at> jpoiret.xyz>, Tobias Geerinckx-Rice <me <at> tobias.gr>, Mathieu Othacehe <othacehe <at> gnu.org>, 74542 <at> debbugs.gnu.org
Subject: [bug#74542] [PATCH 02/11] gnu-maintenance: ‘import-html-release’ doesn’t abort upon HTTP 404.
Date: Tue, 26 Nov 2024 18:16:38 +0100
Simon Tournier <zimon.toutoune <at> gmail.com> skribis:

> On Tue, 26 Nov 2024 at 11:33, Ludovic Courtès <ludo <at> gnu.org> wrote:
>
>> +  #:use-module (srfi srfi-34)
>
> [...]
>
>> +  (guard (c ((http-get-error? c)
>> +             (warning (G_ "failed to download '~a': ~a (~a)~%")
>> +                      url (http-get-error-code c)
>> +                      (http-get-error-reason c))
>> +             '()))
>> +    (let* ((uri   (string->uri url))
>> +           (port  (http-fetch/cached uri #:ttl 3600))
>> +           (sxml  (html->sxml port)))
>> +      (close-port port)
>> +      (delete-duplicates (html-links sxml)))))
>
> I’m always confused by which framework for exception does the project
> rely on?  There is old ’catch’ and ’throw’ then sometimes new
> ’with-exception-handler’ and ’raise’.  And also SRFI 34.
>
> What’s the preferred convention?

My take: SRFI-34.  Before 3.0 we had to use ‘catch’ for key+args
exceptions, which is why it’s still used a lot.

Hopefully it’ll get more homogeneous over time.  :-)

Ludo’.




This bug report was last modified 169 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.