deadfoxygrandpa / Elm.tmLanguage

Elm language syntax highlighting and tool integration for ST2/3
https://packagecontrol.io/packages/Elm%20Language%20Support
MIT License
122 stars 27 forks source link

ANSI Color escape characters not handled properly on Elm 0.16.0 #51

Closed pdamoc closed 8 years ago

pdamoc commented 8 years ago

The new error messages in Elm 0.16.0 produce an error that looks like this:

6d39b9ae-7b07-11e5-9cb5-ee2ac23d2362

I have reported this as an issue on elm-compiler and Evan said it is related to the Sublime Plugin not handling ANSI escape characters properly.

Looking at this stackoverflow answer I think that it might be ANSI color escape characters.

pdamoc commented 8 years ago

The following repository might have some code that could solve this. https://github.com/aziz/SublimeANSI

texastoland commented 8 years ago

Can you link the issue? We could fix it but we're consuming the API for tooling authors. Ultimately @evancz should sanitize JSON of console artifacts such as color sequences. Unless @deadfoxygrandpa disagrees I recommend leaving it to the compiler. PRs welcome (CC @rtfeldman).

evancz commented 8 years ago

elm-make checks to see if it is printing to the terminal or not, and it only prints colors if it is going to the terminal. Otherwise there should be no escape characters. Furthermore, when creating JSON, it should just be producing strings.

If you are reading from terminal somehow, then the bug is here. If it is reading from JSON then there is something freaky going on in elm-compiler or elm-make that I have not observed yet.

texastoland commented 8 years ago

Thanks for the explanation I'll look :+1:

pdamoc commented 8 years ago

Fixed in latest version.

fbonetti commented 8 years ago

I'm still seeing this issue. Is anyone else having this problem? Here's my environment:

screen shot 2016-02-11 at 9 49 01 am