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

Previous Next

Package: guix-patches;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Thu, 30 Sep 2021 09:33:01 UTC

Severity: normal

Tags: patch

Full log


Message #11 received at 50914 <at> debbugs.gnu.org (full text, mbox):

From: Jack Hill <jackhill <at> jackhill.us>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 50914 <at> debbugs.gnu.org
Subject: Re: [bug#50914] [PATCH] records: Raise a &fix-hint if a field has
 multiple values.
Date: Mon, 4 Oct 2021 22:02:18 -0400 (EDT)
[Message part 1 (text/plain, inline)]
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

This bug report was last modified 3 years and 252 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.