Dovecot <namespace-configuration> has two ‘location’ fields

  • Open
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 8 May 2021 15:02
Dovecot <namespace-configuration> has two ‘locati on’ fields
(address . bug-guix@gnu.org)
87h7jd8jld.fsf@inria.fr
I just noticed this compiler warning:

Toggle snippet (4 lines)
gnu/services/mail.scm:431:0: warning: shadows previous definition of `%namespace-configuration-location-procedure' at gnu/services/mail.scm:431:0
<unknown-location>: warning: shadows previous definition of `namespace-configuration-location' at <unknown-location>

I believe this comes from the fact that ‘define-configuration’
automatically introduces a ‘location’ field (for the source code
location of <namespace-configuration> instantiations), which clashes
with this one:

Toggle snippet (6 lines)
(location
(string "")
"Physical location of the mailbox. This is in same format as
mail_location, which is also the default for it.")

I think this was revealed by the fix in commit
dd0826fbf345dfe7289cf943ed2d29edc51d543f.

Probably the only sane way to address it is by renaming the field above.

Thoughts?

Ludo’.
M
M
Maxim Cournoyer wrote on 18 May 2021 14:35
Re: bug#48284: Dovecot <namespace-configuration> has two ‘location’ fields
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 48284@debbugs.gnu.org)
87sg2kmd7g.fsf@gmail.com
Hi Ludo,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (21 lines)
> I just noticed this compiler warning:
>
> gnu/services/mail.scm:431:0: warning: shadows previous definition of `%namespace-configuration-location-procedure' at gnu/services/mail.scm:431:0
> <unknown-location>: warning: shadows previous definition of `namespace-configuration-location' at <unknown-location>
>
>
> I believe this comes from the fact that ‘define-configuration’
> automatically introduces a ‘location’ field (for the source code
> location of <namespace-configuration> instantiations), which clashes
> with this one:
>
> (location
> (string "")
> "Physical location of the mailbox. This is in same format as
> mail_location, which is also the default for it.")
>
> I think this was revealed by the fix in commit
> dd0826fbf345dfe7289cf943ed2d29edc51d543f.
>
> Probably the only sane way to address it is by renaming the field above.

We could also rename the define-configuration produced %location field
accessor to something more explicit such as $name-source-location
instead of $name-location, no?

I don't think that field is being used much at all, given it was
effectively broken prior to the above commit, so renaming it should go
mostly unnoticed.

Maxim
?