all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Remco van 't Veer <remco@remworks.net>
Cc: 54352@debbugs.gnu.org, Maxime Devos <maximedevos@telenet.be>
Subject: [bug#54352] [PATCH] services: dnsmasq: Add more options.
Date: Tue, 22 Mar 2022 11:02:29 +0100	[thread overview]
Message-ID: <87mthii9u2.fsf@gnu.org> (raw)
In-Reply-To: <8735jabfqh.fsf@remworks.net> (Remco van t. Veer's message of "Tue, 22 Mar 2022 08:36:54 +0100")

Hi,

Remco van 't Veer <remco@remworks.net> skribis:

> 2022/03/21 19:36, Maxime Devos:
>
>> [[PGP Signed Part:Undecided]]
>> Ludovic Courtès schreef op ma 21-03-2022 om 16:22 [+0100]:
>>> I think this suggestion is beyond the scope of this review: we’ve never
>>> used sanitizers like this before (or almost), and this particular piece
>>> of code doesn’t use them.
>>>
>>> Also, with the recent discussion about the introduction of contracts,
>>> I’d rather wait an use contracts everywhere once they’re available.
>>
>> Seems reasonable to me, given that the specifics weren't discussed yet,
>> although _everywhere_ (for all procedures, records, ...) seems a bit
>> much, unless you meant every field of the dnsmasq record.

Sorry, I wasn’t clear.  I mean, when we have contracts in Guix, we can
start using them “everywhere” in Guix, primarily for configuration
records.  But we’re not there yet and how exactly we’ll get there
remains to be seen.

> I can add something like the following:
>
>   (define (assert-boolean value)
>     (unless (false-if-exception (boolean? value))
>       (error-out (format #f "expected a boolean, got: ~s" value)))
>     value)
>
> and use it to do
>
>   (sanitize assert-boolean)

My suggestion is to just do nothing for the dnsmasq record; just leave a
comment about the expected type next to it and in the manual, as is done
for almost every other configuration record.

Eventually we’ll turn that into contracts with good error reporting, I
hope, but that’s not something you can do right now.  :-)

Thanks!

Ludo’.




  reply	other threads:[~2022-03-22 10:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-12 15:48 [bug#54352] [PATCH] services: dnsmasq: Add more options Remco van 't Veer
2022-03-19 10:54 ` Ludovic Courtès
2022-03-20 11:42   ` Remco van 't Veer
2022-03-20 11:44 ` [bug#54352] [PATCH v2] " Remco van 't Veer
2022-03-20 11:56   ` Maxime Devos
2022-03-20 12:22     ` Remco van 't Veer
2022-03-20 12:30       ` Maxime Devos
2022-03-20 13:04         ` Remco van 't Veer
2022-03-21 15:22     ` [bug#54352] [PATCH] " Ludovic Courtès
2022-03-21 18:36       ` Maxime Devos
2022-03-22  7:36         ` Remco van 't Veer
2022-03-22 10:02           ` Ludovic Courtès [this message]
2022-03-23  7:09             ` Remco van 't Veer
2022-03-20 12:31   ` [bug#54352] [PATCH v2] " Maxime Devos
2022-03-20 12:58     ` Remco van 't Veer
2022-03-20 12:32   ` Maxime Devos
2022-03-20 12:57     ` Remco van 't Veer
2022-03-20 13:16       ` Maxime Devos
2022-03-22  7:54         ` Remco van 't Veer
2022-03-20 12:36   ` Maxime Devos
2022-03-20 13:15     ` Remco van 't Veer
2022-03-20 13:17       ` Maxime Devos
2022-03-22  7:48         ` Remco van 't Veer
2022-03-20 13:20       ` Maxime Devos
2022-03-22  7:40         ` Remco van 't Veer
2022-03-23  7:07 ` [bug#54352] [PATCH v3] " Remco van 't Veer
2022-03-24 11:22   ` bug#54352: [PATCH] " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mthii9u2.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=54352@debbugs.gnu.org \
    --cc=maximedevos@telenet.be \
    --cc=remco@remworks.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.