-
Notifications
You must be signed in to change notification settings - Fork 725
Open
Labels
Cabal: parserre: user experienceUser experience (UX) issueUser experience (UX) issuetype: enhancement
Description
Describe the bug
Having a cabal file that is not of valid field syntax would trip the field parser. The field parser is run with a hardcoded filepath "the input" and the error message is unhelpful as it mentions "the input".
The outer parser would also trip (the one with the correct filepath) and this emits two filenames in the error.
Errors encountered when parsing cabal file ./simple.cabal:
simple.cabal:1:1: error:
"the input" (line 1, column 1):
unexpected operator ","
expecting field or section name
1 | ,
| ^
To Reproduce
Steps to reproduce the behavior:
$ echo "," > simple.cabal
$ cabal buildExpected behavior
One single correct filepath being indicated
System information
Linux 6.12.47, NixOS, 25.05 (Warbler), 872106a4cabal3.14.2.0 (present in master branch revision 1e3c355), ghc 9.8.4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Cabal: parserre: user experienceUser experience (UX) issueUser experience (UX) issuetype: enhancement