[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#62298] [PATCH v2 8/8] services: mympd: Use user-account (resp. user
From: |
Liliana Marie Prikler |
Subject: |
[bug#62298] [PATCH v2 8/8] services: mympd: Use user-account (resp. user-group) for user (resp. group) fields. |
Date: |
Sat, 25 Mar 2023 06:21:59 +0100 |
User-agent: |
Evolution 3.46.0 |
Am Samstag, dem 25.03.2023 um 00:33 +0000 schrieb Bruno Victal:
> On 2023-03-24 16:03, Maxim Cournoyer wrote:> Bruno Victal
> <mirai@makinata.eu> writes:
> > >
> > > +;; XXX: These will shadow the previous definition used by mpd
> > > +;; and cause warnings to be shown. Maybe split the file
> > > +;; into audio/mpd.scm and audio/mympd.scm ?
> > > +#;(define-maybe/no-serialization user-account)
> > > +#;(define-maybe/no-serialization user-group)
> >
> > I'd rather keeping them together if possible; could the prefix
> > trick be
> > used with them? No need for a hanging indent for continued text,
> > here
> > and for the other occurrences.
>
> The prefix trick is unlikely to help since the previous ones already
> use it.
> --8<---------------cut here---------------start------------->8---
> (define-maybe user-account (prefix mpd-))
> (define-maybe user-group (prefix mpd-))
> --8<---------------cut here---------------end--------------->8---
>
> I'm using define-maybe as a “cheat” here for prettier documentation
> generation.
> Without define-maybe, the documentation is rendered as:
>
> --8<---------------cut here---------------start------------->8---
> @item @code{user} (type: user-account)
> The user to run mpd as.
> --8<---------------cut here---------------end--------------->8---
>
> … which is the documentation format for a field that requires an
> explicit value, even though we are setting a default one using %mpd-
> account.
>
> On the other hand, using define-maybe yields:
>
> --8<---------------cut here---------------start------------->8---
> @item @code{user} (type: maybe-user-account)
> The user to run mpd as.
> --8<---------------cut here---------------end--------------->8---
>
> … which is the format for fields that do not require any manual
> intervention.
This is a slight abuse of define-maybe, though. define-maybe
communicates, that the field having no value, i.e. not even a default
value, is acceptable. Since we always need a user to run MPD with,
this makes no sense semantically.
> > The expressions commented; should they be? On another note, '#;'
> > appears undocumented, I'd avoid it until it is (and it's not
> > necessary
> > here).
>
> They're commented because the “right way of things” would have that
> the first maybe-user-account is mpd-configuration specific due to
> (prefix mpd-) and that we should have another maybe-user-account that
> is unrelated.
Since we require "explicit" users in both cases, I think we can work
around this by dropping the maybe, no?
Cheers
- [bug#62298] [PATCH v2 2/8] services: replace bare serializers with (serializer ...), (continued)
- [bug#62298] [PATCH v2 2/8] services: replace bare serializers with (serializer ...), Bruno Victal, 2023/03/23
- [bug#62298] [PATCH v2 6/8] services: mpd: Set PulseAudio related variables as default value for environment-variables field., Bruno Victal, 2023/03/23
- [bug#62298] [PATCH v2 3/8] services: audio: remove redundant list-of-string? predicate., Bruno Victal, 2023/03/23
- [bug#62298] [PATCH v2 8/8] services: mympd: Use user-account (resp. user-group) for user (resp. group) fields., Bruno Victal, 2023/03/23
- [bug#62298] [PATCH v2 8/8] services: mympd: Use user-account (resp. user-group) for user (resp. group) fields., Maxim Cournoyer, 2023/03/24
- [bug#62298] [PATCH v2 8/8] services: mympd: Use user-account (resp. user-group) for user (resp. group) fields., Bruno Victal, 2023/03/24
- [bug#62298] [PATCH v2 8/8] services: mympd: Use user-account (resp. user-group) for user (resp. group) fields.,
Liliana Marie Prikler <=
[bug#62298] [PATCH v2 7/8] services: mpd: Use user-account (resp. user-group) for user (resp. group) fields., Bruno Victal, 2023/03/23
[bug#62298] [PATCH v2 5/8] services: mpd: Fix unintentional API breakage for mixer-type field., Bruno Victal, 2023/03/23
[bug#62298] [PATCH v2 1/8] services: configuration: Add user-defined sanitizer support., Liliana Marie Prikler, 2023/03/23
[bug#62298] [PATCH v2 1/8] services: configuration: Add user-defined sanitizer support., Maxim Cournoyer, 2023/03/24
[bug#62298] [PATCH v3 1/5] services: configuration: Add user-defined sanitizer support., Bruno Victal, 2023/03/24