GNU bug report logs -
#62969
[PATCH] home: Add msmtp service.
Previous Next
Full log
View this message in rfc822 format
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
This bug report was last modified 2 years and 45 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.