Re: Add a way to disable serialization support to (guix services configuration)

2021-05-07 Thread Maxim Cournoyer
Hi, Xinglu Chen writes: [...] > From 90d63a46a29a8080b7f95eabcec115c5c2c6481e Mon Sep 17 00:00:00 2001 > Message-Id: > <90d63a46a29a8080b7f95eabcec115c5c2c6481e.1619869705.git.pub...@yoctocell.xyz> > In-Reply-To: > References: > From: Xinglu Chen > Date: Sat, 1 May 2021 13:31:27 +0200 >

Re: Add a way to disable serialization support to (guix services configuration)

2021-05-07 Thread Xinglu Chen
Hi Maxim, On Fri, May 07 2021, Maxim Cournoyer wrote: > Hello Xinglu! > > Thank you for working on it! You are very welcome! These are things that have annoyed me enough so I decided (try) to fix it myself :) >> +(define (configuration-no-default-value kind field) >> + (configuration-error

Re: Add a way to disable serialization support to (guix services configuration)

2021-05-06 Thread Maxim Cournoyer
Hello Xinglu! Thank you for working on it! I spent the evening trying things but none worked, so your kudos for finding how to make it work! :-). Some comments follow (and a patch implementing them): Xinglu Chen writes: [...] > @@ -63,6 +64,9 @@ > (define (configuration-missing-field kind

Re: Add a way to disable serialization support to (guix services configuration)

2021-05-01 Thread Xinglu Chen
Hi, On Fri, Apr 23 2021, Xinglu Chen wrote: >> Wouldn’t it be nicer to write: >> >> (define-configuration foo >> (bar (integer 123) "doc" no-serializer) >> (baz (string "") "doc")) >> >> where ‘bar’ wouldn’t have a serializer and ‘baz’ would? >> >> It’s also probably easier to

Re: Add a way to disable serialization support to (guix services configuration)

2021-04-23 Thread Xinglu Chen
Hi, On Fri, Apr 23 2021, Ludovic Courtès wrote: > Hi, > > Maxim Cournoyer skribis: > >>> +(define-syntax-rule (without-field-serialization definition) >>> + (syntax-parameterize ((configuration-field-serialization? >>> + (identifier-syntax #f))) >>> +definition >>>

Re: Add a way to disable serialization support to (guix services configuration)

2021-04-22 Thread Ludovic Courtès
Hi, Maxim Cournoyer skribis: >> +(define-syntax-rule (without-field-serialization definition) >> + (syntax-parameterize ((configuration-field-serialization? >> + (identifier-syntax #f))) >> +definition >> +#t)) >> + >> +(without-field-serialization >> +

Re: Add a way to disable serialization support to (guix services configuration)

2021-04-21 Thread Maxim Cournoyer
Hello again, Ludovic Courtès writes: [...] > diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm > index 90f12a8d39..20e1647335 100644 > --- a/gnu/services/configuration.scm > +++ b/gnu/services/configuration.scm > @@ -109,6 +109,9 @@ > (define

Re: Add a way to disable serialization support to (guix services configuration)

2021-04-21 Thread Maxim Cournoyer
Hi Ludovic, Ludovic Courtès writes: > Hi Maxim, > > Maxim Cournoyer skribis: > >> I've rediscovered the little gem that is (guix services configurations), >> and attempted to make it more generally useful by adding an option to >> opt out of serialization (which is not well adapted for

Re: Add a way to disable serialization support to (guix services configuration)

2021-04-17 Thread Ludovic Courtès
Hi Maxim, Maxim Cournoyer skribis: > I've rediscovered the little gem that is (guix services configurations), > and attempted to make it more generally useful by adding an option to > opt out of serialization (which is not well adapted for producing a list > of command line arguments from the

Add a way to disable serialization support to (guix services configuration)

2021-04-12 Thread Maxim Cournoyer
Hello Guix! I've rediscovered the little gem that is (guix services configurations), and attempted to make it more generally useful by adding an option to opt out of serialization (which is not well adapted for producing a list of command line arguments from the configuration for example):