* bug#23969: hard to understand error message
@ 2016-07-13 7:48 Vincent Legoll
2016-07-14 17:09 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Legoll @ 2016-07-13 7:48 UTC (permalink / raw)
To: 23969
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#23969: hard to understand error message
2016-07-13 7:48 bug#23969: hard to understand error message Vincent Legoll
@ 2016-07-14 17:09 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2016-07-14 17:09 UTC (permalink / raw)
To: Vincent Legoll; +Cc: 23969-done
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’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-14 17:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-13 7:48 bug#23969: hard to understand error message Vincent Legoll
2016-07-14 17:09 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.