Re: [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-05 Thread Maxime Devos
On 05-08-2022 10:31, Ludovic Courtès wrote: I understand what you’re saying (I’m quite familiar with Guile’s module system :-) and I do agree that #:ensure #t can lead to bad surprises), but I don’t think this is correct: --8<---cut here---start->8--- scheme@

Re: [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-05 Thread Ludovic Courtès
Hi, Maxime Devos skribis: > On 02-08-2022 09:59, Ludovic Courtès wrote: + (if (module-defined? (resolve-interface '(gnutls)) + 'set-session-record-port-close!) ;GnuTLS >= 3.7.7 >>> resolve-module (and presumably also sets #:ensure #t by default, whi

Re: [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-04 Thread Maxime Devos
On 02-08-2022 09:59, Ludovic Courtès wrote: + (if (module-defined? (resolve-interface '(gnutls)) + 'set-session-record-port-close!) ;GnuTLS >= 3.7.7 resolve-module (and presumably also sets #:ensure #t by default, which sometimes causes 'module not found' messages

Re: bug#56867: [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-04 Thread Chris Vine
On Thu, 04 Aug 2022 16:20:12 +0200 Ludovic Courtès wrote: > Ludovic Courtès skribis: > > > The custom input/output port wrapping the TLS session record port would > > introduce overhead, and it would also prevent its uses in a non-blocking > > context--e.g., with Fibers. The port close mechanis

Re: [bug#56867] [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-04 Thread Thiago Jung Bauermann
Hello Ludo, I don't have any comment/insight on what you're doing in general, except about one of your points below: Ludovic Courtès writes: > First, I noticed that GnuTLS doesn’t implement ‘write_wait_fd’, only > ‘read_wait_fd’ (not sure how problematic that is): > > scheme@(guile-user)> ,us

Re: [bug#56867] [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-04 Thread Ludovic Courtès
Hi, Thiago Jung Bauermann skribis: > Ludovic Courtès writes: > >> First, I noticed that GnuTLS doesn’t implement ‘write_wait_fd’, only >> ‘read_wait_fd’ (not sure how problematic that is): >> >> scheme@(guile-user)> ,use(web client) >> scheme@(guile-user)> (define p (open-socket-for-uri "https:

Re: bug#56867: [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-04 Thread Ludovic Courtès
Ludovic Courtès skribis: > The custom input/output port wrapping the TLS session record port would > introduce overhead, and it would also prevent its uses in a non-blocking > context--e.g., with Fibers. The port close mechanism added in GnuTLS > 3.7.7 allows us to get rid of that wrapper. > > *

Re: bug#56867: [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-03 Thread Ludovic Courtès
Ludovic Courtès skribis: > The custom input/output port wrapping the TLS session record port would > introduce overhead, and it would also prevent its uses in a non-blocking > context--e.g., with Fibers. The port close mechanism added in GnuTLS > 3.7.7 allows us to get rid of that wrapper. > > *

Re: [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-02 Thread Ludovic Courtès
Hi, Maxime Devos skribis: > On 01-08-2022 11:07, Ludovic Courtès wrote: [...] >> + (define (read! bv start count) >> +(define read >> + (catch 'gnutls-error >> +(lambda () >> + (get-bytevector-n! record bv start count)) >> +(lambda (key err proc . rest) >> +

Re: [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-01 Thread Maxime Devos
Some objections on error handling (I don't know much about the wrapping) On 01-08-2022 11:07, Ludovic Courtès wrote: [...] Hello! I'll land a similar change in Guile's (web client) module afterwards if there are no objections. Ludo'. diff --git a/guix/build/download.scm b/guix/build/download.

Re: bug#56867: [PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-01 Thread Ludovic Courtès
Ludovic Courtès skribis: > The custom input/output port wrapping the TLS session record port would > introduce overhead, and it would also prevent its uses in a non-blocking > context--e.g., with Fibers. The port close mechanism added in GnuTLS > 3.7.7 allows us to get rid of that wrapper. And

[PATCH] download: Do not wrap TLS port on GnuTLS >= 3.7.7.

2022-08-01 Thread Ludovic Courtès
The custom input/output port wrapping the TLS session record port would introduce overhead, and it would also prevent its uses in a non-blocking context--e.g., with Fibers. The port close mechanism added in GnuTLS 3.7.7 allows us to get rid of that wrapper. * guix/build/download.scm (wrap-record-