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

Show correct filename when reporting errors #44

Closed
avh4 opened this issue Oct 26, 2015 · 6 comments
Closed

Show correct filename when reporting errors #44

avh4 opened this issue Oct 26, 2015 · 6 comments

Comments

@avh4
Copy link
Owner

avh4 commented Oct 26, 2015

Should show the input filename instead of <location> in the following:

Processing file tests/test-files/recursive-directory/nested/invalid.elm
ERRORS
-- SYNTAX PROBLEM --------------------------------------------------- <location>

I ran into something unexpected when parsing your code!

See Main.hs#printError

@avh4 avh4 added this to the 1.0.0 MVP milestone Oct 26, 2015
@avh4 avh4 mentioned this issue Oct 26, 2015
@Janiczek
Copy link
Contributor

Should the "Processing file xyz.elm" message stay there or will it be rendered obsolete (and should be deleted) with the <location> placeholder properly showing the filepath?

@avh4
Copy link
Owner Author

avh4 commented Oct 26, 2015

I'm not sure, but hopefully it will be obsolete after replacing <location>

@Janiczek
Copy link
Contributor

One problem I can see (even in your example here) is that the path to the file will be too long for the row with <location>. Should we maybe show just the filename?

@avh4
Copy link
Owner Author

avh4 commented Oct 26, 2015

We should try to do the same thing elm-make does when you give it a long path.

@Janiczek
Copy link
Contributor

OK so the behavior is overflowing the 80-chars column, not breaking any lines. Also see the ## ERRORS line. We'll have to change that too (right now our version of it doesn't match the style of elm-make

## ERRORS in dlooooouhy-adresar/dalsi-vnoreny/MujProgram.elm ###################

-- TYPE MISMATCH --------------- dlooooouhy-adresar/dalsi-vnoreny/MujProgram.elm
## ERRORS in dlooooouhy-adresar/dalsi-vnoreny/a-jeste-dalsi/can-we-go-deeper/MujProgram.elm 

-- TYPE MISMATCH - dlooooouhy-adresar/dalsi-vnoreny/a-jeste-dalsi/can-we-go-deeper/MujProgram.elm

@avh4
Copy link
Owner Author

avh4 commented Feb 8, 2016

Fixed in 5756a8d.

@avh4 avh4 closed this as completed Feb 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants