guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#62969] [PATCH] home: Add msmtp service.


From: Tanguy LE CARROUR
Subject: [bug#62969] [PATCH] home: Add msmtp service.
Date: Sun, 23 Apr 2023 19:10:15 +0200
User-agent: alot/0.10

Hi Bruno,

Thank you so much for you comments!
I've applied (almost, see below) all of your suggestions and I will send a v2.


Quoting Bruno Victal (2023-04-20 18:36:59)
> On 2023-04-20 15:42, Tanguy Le Carrour wrote:
> > +(define (configuration-serialize-maybe-string field-name value)
> > +  #~(if #$(maybe-value-set? value)
> > +      (string-append #$(uglify-symbol field-name) " " #$value "\n")
> > +      ""))> +
> > +(define (configuration-serialize-maybe-integer field-name value)
> > +  #~(if #$(maybe-value-set? value)
> > +      (string-append #$(uglify-symbol field-name) " " (number->string 
> > #$value) "\n")
> > +      ""))
> > +
> > +(define (configuration-serialize-maybe-boolean field-name value)
> > +  #~(if #$(maybe-value-set? value)
> > +      (string-append #$(uglify-symbol field-name) " " (if #$value "on" 
> > "off") "\n")
> > +      ""))
> You don't have to perform the maybe-value-set? checks, it is automatically 
> done for you.
> The only cases where this isn't true is if you explicitly override the 
> serializer in
> define-configuration. [2]

This is the only thing I can't figure out how to make work?!
When I remove the `(if #$(maybe-value-set? value) …)` I get the
following error:

```
Backtrace:
          10 (primitive-load "/gnu/store/ajcf46q8yr9sb9n90psa5ay96jw?")
In ice-9/ports.scm:
   433:17  9 (call-with-output-file _ _ #:binary _ #:encoding _)
In ice-9/eval.scm:
    159:9  8 (_ #(#(#<directory (guile-user) 7ffff3fd7c80>) #<outp?>))
    155:9  7 (_ #(#(#<directory (guile-user) 7ffff3fd7c80>) #<outp?>))
   173:39  6 (_ #(#(#<directory (guile-user) 7ffff3fd7c80>) #<outp?>))
    159:9  5 (_ #(#(#<directory (guile-user) 7ffff3fd7c80>) #<outp?>))
   173:55  4 (_ #(#(#<directory (guile-user) 7ffff3fd7c80>) #<outp?>))
   173:55  3 (_ #(#(#<directory (guile-user) 7ffff3fd7c80>) #<outp?>))
   279:15  2 (_ #(#(#<directory (guile-user) 7ffff3fd7c80>) #<outp?>))
   223:20  1 (proc #(#(#<directory (guile-user) 7ffff3fd7c80>) #<o?>))
In unknown file:
           0 (%resolve-variable (7 . %unset-marker%) #<directory (gu?>)

ERROR: In procedure %resolve-variable:
Unbound variable: %unset-marker%
```


> > +  (prefix configuration-))
> These are poor prefix choices for a module named (gnu home services mail).
> If it were (gnu home services msmtp) or (gnu home services mail msmtp) it 
> would be acceptable
> but a module named (gnu home services mail) is expected to eventually contain 
> multiple services that
> have to co-exist. These prefixes are too non-specific and confusion prone for 
> such circumstances.
> 
> I'd set this to (prefix msmtp-configuration-). (the same logic applies to the 
> remaining (prefix ...) lines)

I totally agree! You guessed correctly, this home service was living
inside `(bioneland home services msmtp)`, so the naming seemed to make
sense at the time, but not any more!

Thanks again for your time and help!

-- 
Tanguy





reply via email to

[Prev in Thread] Current Thread [Next in Thread]