From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 09 14:22:16 2022 Received: (at 59866) by debbugs.gnu.org; 9 Dec 2022 19:22:16 +0000 Received: from localhost ([127.0.0.1]:37956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3iwq-0002AX-Dw for submit@debbugs.gnu.org; Fri, 09 Dec 2022 14:22:16 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:43878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3iwo-0002AO-Lm; Fri, 09 Dec 2022 14:22:15 -0500 Received: by mail-ed1-f66.google.com with SMTP id r26so4406588edc.10; Fri, 09 Dec 2022 11:22:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=UYDUuFv+QX94mxBglSp5PdFi+xLnIehulY1Kn2d4rPk=; b=KppNnK2Rwihk1crComLMhSa8UPjEjnxOrvoFpi9/o6czta1sVPgUzpeos/35nSDCli pHmpQxgC3fd/QWJxESu2bTxM2rPy6eBrP5e9IsjCkB+GYlw6bVeBdVEOCMD2B8WaF18/ jB9cjqwR4o3gNlfe9AH7uHDSqvH+QvBr6scud+GRCkt3+M8inETA2HIJbt/v3OnS/AET nQ7rTO4jWaha3P4ClWdk77xoPEeiwYJbxLAGtGpaaQAIrYgJ62kiFPYNHyYhkCM/tPIo 0e+WrAwC55phwpk0IVJeB8tOHg5wDUu1wPx1pIENEbg4PkP/WJCtnstPFkG4JI6M2q5q wunw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=UYDUuFv+QX94mxBglSp5PdFi+xLnIehulY1Kn2d4rPk=; b=j168HP51cwZcv5/eUpyBea305ud492017v4GSqRRy/w52QcHKlkf5IsuB0HtB9QNBg cWcyT0ii4eHU3o+Rl5R4Ffg6b56I0S+cRcsodJu08AEGiloWE7X2zE7LtgACpxhRJtHB puVyjUh8zF/PyUCgrWCcx3Q2smyzxRxsoQmXQJVQU3eLW+Cv8xM13IXwEZpI6IJzNvt7 OsFGaIfsY1S9m0qjz13B/HUzTQ4RDfiqTcgM6pEvJRcDjBC/NH3RhjTcORxLNif18rpD E9dD26QDvSD8k4eBXofFRM81x1qPGkTZOyl7wL5H1yRqZjQAirhMVdPscz000jPeFNzQ vjEQ== X-Gm-Message-State: ANoB5pk8jEFIDGwmewfrj/1vNjLkulrFmz2T9ugeJzA8YoaPV9aqtVnH 1Cspbbns33f2lkn9cbgW/oofCbE+hrs= X-Google-Smtp-Source: AA0mqf6QXuoUzjKeH5AwW76lueHl196u1Gr0R1HUOqdnAauMuHb10TlDjd+gON94I5xhAyStTRZ0cw== X-Received: by 2002:a05:6402:1047:b0:45c:835b:ac4d with SMTP id e7-20020a056402104700b0045c835bac4dmr5736202edu.8.1670613728618; Fri, 09 Dec 2022 11:22:08 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id m6-20020a056402050600b0046c5baa1f58sm952676edv.97.2022.12.09.11.22.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 11:22:08 -0800 (PST) Message-ID: <4e6249e0970fcd02ac4666ce1fd40203b4b09003.camel@gmail.com> Subject: Re: [PATCH 0/2] services: mpd: Refactor MPD service From: Liliana Marie Prikler To: mirai , 59866@debbugs.gnu.org Date: Fri, 09 Dec 2022 20:22:06 +0100 In-Reply-To: References: <6e66967984d1bc22d8abf5dd4b07c1a20b4b06ee.camel@gmail.com> <71f31a0d-cc58-a0e6-4aa4-b5c46513c835@makinata.eu> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59866 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 (-) Am Freitag, dem 09.12.2022 um 13:44 +0000 schrieb mirai: > 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.=C2=A0 Looking at [4], it appears the meaning > > of "port" is closer to that of a default port, as addresses can > > have ports in them.=C2=A0 > > 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. >=20 > 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: >=20 > --8<---------------cut here---------------start------------->8--- > ;; should fire a error message during guix system reconfigure > (mpd-configuration > =C2=A0 (addresses `("[::]:6645"=C2=A0=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 ,(shepherd-endpoint > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (address "/var/run/mpd-shepherd-socket"))))) > --8<---------------cut here---------------end--------------->8--- >=20 > 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: >=20 > --8<---------------cut here---------------start------------->8--- > (define list-of-addresses (list-of (lambda (x) (or (string? x) > (shepherd-endpoint? x))))) > --8<---------------cut here---------------end--------------->8--- Something like that, but I don't think the vocabulary matches 1:1. In my opinion, an address is an endpoint =E2=80=93 not a shepherd endpoint, bu= t an endpoint still =E2=80=93 while a shepherd endpoint is not an address. Thus= , I propose changing the vocabulary now to not break backwards compatibility later. IIUC, the change from the previous records to define-configuration is already an API change, so it'd be good to have both in the same series. Cheers