Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat parse errors as errors instead of warnings #5515

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@sol
Copy link
Member

commented Aug 11, 2018

This produces error messages of the form:

cabal: Failed parsing "./foo.cabal".
foo.cabal:0:0: "version" field missing
Treat parse errors as errors instead of warnings
This produces error messages of the form:

    cabal: Failed parsing "./foo.cabal".
    foo.cabal:0:0: "version" field missing
@23Skidoo

This comment has been minimized.

Copy link
Member

commented Aug 11, 2018

Looks reasonable. @phadej, what do you think?

@hvr

This comment has been minimized.

Copy link
Member

commented Aug 11, 2018

IMO, "Failed parsing" is the final conclusion (after having encountered a non-zero amount of hard parser failures), and as such should be the last line of output, after having enumerated encountered errors (and warnings, if we wanted to show those as well).

@sol

This comment has been minimized.

Copy link
Member Author

commented Aug 11, 2018

For comparison:

cabal: foo.cabal:0:0: "version" field missing
Failed parsing "./foo.cabal".

Is that any better?

@hvr

This comment has been minimized.

Copy link
Member

commented Aug 11, 2018

@sol well, the problem is that now each error message is concatenated into a single die-message; thereby losing the individual error messaging structure... I'm starting to see why originally warn was picked... cause we didn't have a non-exiting variant of die at your disposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.