-
Notifications
You must be signed in to change notification settings - Fork 74
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
Clearer error for mixed spaces / tabs nesting in cassius #2
Comments
I'm not sure how to figure out that it's the tabs/spaces mix which is causing the problem. One possible idea (probably a good one) is to simply ban tabs from denoting indentation; I doubt anyone will really complain. However, the bigger issue here is... well, how do I say this politely... I did a god-awful job with the cassius error messages. What the hell does the "Only LineSingle" mean? Fixing that up should definitely rank high on my todo list. |
Hahaha :) Hopefully this issue will serve as a reminder! |
Hey Rehno, I've pushed some commits that bump Hamlet to 0.6 and hopefully make error messages from Cassius much clearer. Mind having a look? I will require modifying Persistent and Yesod to have a higher version bounds on Hamlet. Michael |
Thanks Michael. I quickly started upgrading to yesod 0.6 today, but it looks like I have to upgrade some stuff first! It might take me a little while to catch up with yesod development :) |
I'd vote to ban tabs. They may change meaning of program silently. If your editor and hamlet/cassius have different tab width it may lead either to error or it could be parsed not as you expected. Second case is real. I encountered it. IMHO mixing tabs and significant indentation is generally bad idea™ |
OK, just pushed this commit, tabs for indentation give an error. |
Is it possible to add a clearer error message when mixing tabs with spaces by accident in cassius?
It currently says:
Perhaps you could simply add "Did you accidentally mix tabs and spaces?" as a quick fix if that is possible...?
(This is using cassiusFileDebug)
The text was updated successfully, but these errors were encountered: