unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Vincent Legoll <vincent.legoll@gmail.com>
Cc: 23969-done@debbugs.gnu.org
Subject: bug#23969: hard to understand error message
Date: Thu, 14 Jul 2016 19:09:59 +0200	[thread overview]
Message-ID: <874m7si1so.fsf@gnu.org> (raw)
In-Reply-To: <CAEwRq=qm0XTSuU=Mi8mNTtaHh50EQM9AvdFF7y0jfR0jdT7cAw@mail.gmail.com> (Vincent Legoll's message of "Wed, 13 Jul 2016 09:48:08 +0200")

Hi,

Vincent Legoll <vincent.legoll@gmail.com> skribis:

> I'm discovering guix, and started to try to package something.
>
> I made an error (add a string URL parameter to license x11-style):
>
> (license x11-style "file://LICENSE")
>
> But this is not working, because I've forgotten the scheme call syntax
> (missing parens)
>
> I'll fix my package definition with:
>
> (license (x11-style "file://LICENSE"))
>
> which seems to be working OK...
>
> But the error message I got was very unhelpful:
>
> something.scm:10:2: warning: source expression failed to match any pattern
>
> the line 10 is:
>   (package
>
> whereas the real error happened on line 32 (the license one)
>
> So what's wrong:
> - wrong line number
> - 'source expression' meaning is shady, as there is a "(source (origin
> ...))" element defined in the package, which is also not on line 10,
> but misleading anyways

Indeed.  This is fixed or at least improved in commit
babc2c80a7e1f1b5e72fd1685ef6604b93157a8e.  Now the message looks like:

--8<---------------cut here---------------start------------->8---
ice-9/psyntax.scm:1422:32: Syntax error:
gnu/packages/idutils.scm:42:4: package: invalid field specifier in form (synopsis "Identifier database utilities" foo)
--8<---------------cut here---------------end--------------->8---

Thanks,
Ludo’.

      reply	other threads:[~2016-07-14 17:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13  7:48 bug#23969: hard to understand error message Vincent Legoll
2016-07-14 17:09 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874m7si1so.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=23969-done@debbugs.gnu.org \
    --cc=vincent.legoll@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).