Subject: Re: [bug#50914] [PATCH] records: Raise a &fix-hint if a field has multiple values.

From: Jack Hill <[email-masked]>
Date: Mon, 4 Oct 2021 22:02:18 -0400 (EDT)

Wow, thanks for picking up on an annoyance I mentioned on IRC an providing 
a patch!

On Thu, 30 Sep 2021, Maxime Devos wrote:

> * guix/records.scm (report-invalid-field-specifier): If
>  'weird' is something like (field (record ...) extra ...), hint that 'extra
>  ...' should probably be moved inside (record ...).
> ---

I don't have any comments on the code directly, but while the error 
message is much improved, and would have helped me find my mistake 
quicker, it's still a bit verbose and doesn't seem to be printing your 
nice error message. The error I now get is,

```
gnu/packages/mail.scm:2884:2: error: (package (name "msgconvert") (version "0.920") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/mvz/email-outlook-message-perl") (commit "dd382f47fd112032bf91cb673178a27142d23e38"))))) (sha256 (base32 "0idhpvafy0gy3bdvw98q974wdv2x6vld2sv1f95ssl4l226cdqs4")) (file-name (git-file-name name version)) (build-system perl-build-system) (native-inputs (quasiquote (("perl-module-build" (unquote perl-module-build))))) (inputs (quasiquote (("perl-email-address" (unquote perl-email-address)) ("perl-email-mime" (unquote perl-email-mime)) ("perl-email-mime-contenttype" (unquote perl-email-mime-contenttype)) ("perl-email-sender" (unquote perl-email-sender)) ("perl-email-simple" (unquote perl-email-simple)) ("perl-io-all" (unquote perl-io-all)) ("perl-io-string" (unquote perl-io-string)) ("perl-ole-storage-lite" (unquote perl-ole-storage-lite))))) (home-page "https://www.matijs.net/software/msgconv") (synopsis "Foo") (description "Foo.") (license license:gpl1+)): extraneous field initializers (sha256 file-name)
```

For reference, the faulty package definition I used to test:

```
(define-public msgconvert
   (package
     (name "msgconvert")
     (version "0.920")
     (source
      (origin
        (method git-fetch)
        (uri
         (git-reference
          (url "https://github.com/mvz/email-outlook-message-perl")
          (commit "dd382f47fd112032bf91cb673178a27142d23e38" ;; (string-append "v" version)
                  )))
        ))
     (sha256
         (base32 "0idhpvafy0gy3bdvw98q974wdv2x6vld2sv1f95ssl4l226cdqs4"))
        (file-name (git-file-name name version))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-module-build" ,perl-module-build)))
     (inputs
      `(("perl-email-address" ,perl-email-address)
        ("perl-email-mime" ,perl-email-mime)
        ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
        ("perl-email-sender" ,perl-email-sender)
        ("perl-email-simple" ,perl-email-simple)
        ("perl-io-all" ,perl-io-all)
        ("perl-io-string" ,perl-io-string)
        ("perl-ole-storage-lite" ,perl-ole-storage-lite)))
     (home-page "https://www.matijs.net/software/msgconv")
     (synopsis "Foo")
     (description "Foo.")
     (license license:gpl1+)))
```

Best,
Jack