hard to understand error message

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Vincent Legoll
Owner
unassigned
Submitted by
Vincent Legoll
Severity
normal

Debbugs page

Vincent Legoll wrote 9 years ago
(address . bug-guix@gnu.org)
CAEwRq=qm0XTSuU=Mi8mNTtaHh50EQM9AvdFF7y0jfR0jdT7cAw@mail.gmail.com
Hello,

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

I would have expected that error to be reported as:

error: license x11-style: cannot match the pattern : file://LICENSE in
directory /tmp/guix-build-something/something/path/to/where/it/searched

--
Vincent Legoll
Ludovic Courtès wrote 9 years ago
(name . Vincent Legoll)(address . vincent.legoll@gmail.com)(address . 23969-done@debbugs.gnu.org)
874m7si1so.fsf@gnu.org
Hi,

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

Toggle quote (30 lines)
> 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:

Toggle snippet (4 lines)
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)

Thanks,
Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 23969@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 23969
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help