From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 09 08:45:05 2022 Received: (at 54986) by debbugs.gnu.org; 9 Dec 2022 13:45:05 +0000 Received: from localhost ([127.0.0.1]:36195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3dgX-00024I-An for submit@debbugs.gnu.org; Fri, 09 Dec 2022 08:45:05 -0500 Received: from smtpmciv5.myservices.hosting ([185.26.107.241]:50898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3dgV-00023u-DU; Fri, 09 Dec 2022 08:45:03 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.172]) by smtpmciv5.myservices.hosting (Postfix) with ESMTP id E947520BE5; Fri, 9 Dec 2022 14:45:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 865A080098; Fri, 9 Dec 2022 14:45:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-1.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id qmuGHNF6oe9n; Fri, 9 Dec 2022 14:45:00 +0100 (CET) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id DD71480093; Fri, 9 Dec 2022 14:44:59 +0100 (CET) Message-ID: Date: Fri, 9 Dec 2022 13:44:58 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH 0/2] services: mpd: Refactor MPD service Content-Language: en-US To: Liliana Marie Prikler , 59866@debbugs.gnu.org References: <6e66967984d1bc22d8abf5dd4b07c1a20b4b06ee.camel@gmail.com> <71f31a0d-cc58-a0e6-4aa4-b5c46513c835@makinata.eu> From: mirai In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54986 Cc: 54986@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2022-12-08 13:35, Liliana Marie Prikler wrote: > This doesn't work for #54986, which makes it so that in-file addresses > are ignored in favour of handing over the sockets directly through > shepherd. Looking at [4], it appears the meaning of "port" is closer > to that of a default port, as addresses can have ports in them. But I > would still prefer addresses to be "endpoints", which if they happen to > be a list of strings are taken as MPD addresses and if they happen to > be shepherd endpoints are passed on to the shepherd service. Are you proposing for the 'addresses' field to be a "maybe-list-of-string-or-shepherd-endpoint"? (more of a xor as they can't be used simultaneously) Example: --8<---------------cut here---------------start------------->8--- ;; should fire a error message during guix system reconfigure (mpd-configuration (addresses `("[::]:6645" ,(shepherd-endpoint (address "/var/run/mpd-shepherd-socket"))))) --8<---------------cut here---------------end--------------->8--- I don't think it breaks backward compatibility to introduce this after #59866 is merged. The type of field 'addresses' could be changed transparently to something like: --8<---------------cut here---------------start------------->8--- (define list-of-addresses (list-of (lambda (x) (or (string? x) (shepherd-endpoint? x))))) --8<---------------cut here---------------end--------------->8---