GNU bug report logs - #44800
[PATCH 0/2] publish: Add Avahi support.

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <othacehe <at> gnu.org>

Date: Sun, 22 Nov 2020 15:58:02 UTC

Severity: normal

Tags: patch

Merged with 44801, 44802

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 44800 <at> debbugs.gnu.org
Subject: [bug#44800] [PATCH v2 1/3] Add Avahi support.
Date: Sun, 29 Nov 2020 15:18:24 +0100
Hey Ludo,

Thanks for the review :)

> An argument in favor of making it mandatory is that it would help make
> the feature more widely used, and thus more widely useful.

Yes, and most of the other Guile dependencies are mandatory, so having
Guile-Avahi also mandatory feels safer. Plus I'm sure that it can be
useful for other use cases such as offloading.

> You could use (srfi srfi-9) ‘define-record-type’ since the extra (guix
> records) features are not necessary here.

I use (guix records) feature allowing to call the record constructor
with non positional arguments.

> (I wanted to add an API in Guile-Avahi to “invert inversion of control”
> so that one could escape callback hell but never got around to
> completing it.)

Sure, it would be nice, but given libavahi design, not an easy task :).

> Can’t we obtain the IP address without creating a socket actually?  Noob
> here.

I think we can use "getifaddrs" and the its "network-interfaces"
binding, but the resulting code does not seem more readable.

>
>> +    ;; Handle service resolution events.
>> +    (cond ((eq? event resolver-event/found)
>> +           (info (G_ "resolved service `~a' at `~a:~a'~%")
>> +                 service-name (inet-ntop family address) port)
>
> IWBN to not add UI code in here.

Sure, removed!

Mathieu




This bug report was last modified 4 years and 176 days ago.

Previous Next


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