Closed Licenser closed 7 years ago
Also doing syntax errors now:
Wow! This is really beautiful, really excited to see errors that look like this!!
There are two snags though:
There is already some work on formatting errors within Alpaca itself: see https://github.com/alpaca-lang/alpaca/blob/master/src/alpaca_error_format.erl. This allows the errors to be translated. I would really love to see if this level of error reporting could be added to Alpaca itself with the translations, but also with the colours and formatting you've added. @j14159 any thoughts on this? It would be great if we could also provide options to show/hide parts of the output and also make the colours optional.
The rebar plugin is being rewritten quite a lot to take advantage of new Alpaca features (allows for things like incremental builds, auto-imported modules and a few other things) but Alpaca in future will need to be 'installed' rather than compiled per application as parts of the compiler are now built in Alpaca itself. The rewrite also uses Alpaca's own error formatter to display errors (as does the shell, incidentally) so if we can get your work into Alpaca itself, everywhere will benefit automatically.
More then happy to move that to the alpaca repo. It just ended up here since I felt more qualified to contribute to a rebar3 plugin ;).
@lepoetemaudit good catch, I think you're right that this does indeed make sense in the compiler itself.
Also @Licenser I'm happy to help and/or answer any questions you have about the compiler guts. Some of it is...a little byzantine :)
Awesome, I'll bug you on IRC if I run into trouble, I'll take a crack at it later tonight ^.^
A bit late but: https://github.com/alpaca-lang/alpaca/pull/181 should we close this and move it to alpaca core entirely?
@Licenser I'm fine with that, will leave it up to you.
then lets do it ;)
1) Add some nicer output for errors (or the error I found) 2) error on errors and don't continue.
The error:
I'll happily add more over time.