zephyr.js icon indicating copy to clipboard operation
zephyr.js copied to clipboard

ashell: JS eval error messages are not terminated with a newline character

Open siovene opened this issue 8 years ago • 3 comments

All messages that I receive from ashell are terminated with CRLF, but when I try to run some JS code that has errors in it, the messages I receive are only terminated with CR, and no LF.

Because of that, my terminal will perform a CR and then overwrite the same line with the next message, garbling the text.

siovene avatar Feb 16 '17 09:02 siovene

This need bit more planning. That is, we need to separate at least the following data types inside the Web USB connection.

  1. Control messages between the IDE and ashell (ACK, RUN, etc)
  2. JavaScript console messages (via console.log)
  3. JavaScript engine error messages (e.g. Syntax error in line 7, etc)

We need a protocol to make this robust and easy to extend.

poussa avatar Feb 16 '17 10:02 poussa

Until we get around to the newer protocol, I added the newlines. https://github.com/01org/zephyr.js/pull/972

brianjjones avatar Apr 05 '17 17:04 brianjjones

@brianjjones please check status.

grgustaf avatar Jan 24 '18 17:01 grgustaf