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

fix(GUI): don't split robot input by new lines inside properties #1008

Merged
merged 1 commit into from Jan 10, 2017

Conversation

jviotti
Copy link
Contributor

@jviotti jviotti commented Jan 9, 2017

We've recently PRed a commit that handles multiple IPC messages being
triggered at the same time, confusing JSON.parse(). As a solution to
such problem, we are splitting the CLI output on new lines, based on the
assumption that each line represents a different object, however we
didn't consider that in the case of errors, we include an stacktrace
property which usually includes new line characters, causing such
information to be completely garbled and cause JSON.parse() once again
to get confused.

As a solution, we only split by new lines that are not surrounded by
quotes (since they represent a JSON property).

See: #997
Signed-off-by: Juan Cruz Viotti jviotti@openmailbox.org

We've recently PRed a commit that handles multiple IPC messages being
triggered at the same time, confusing `JSON.parse()`. As a solution to
such problem, we are splitting the CLI output on new lines, based on the
assumption that each line represents a different object, however we
didn't consider that in the case of errors, we include an `stacktrace`
property which usually includes new line characters, causing such
information to be completely garbled and cause `JSON.parse()` once again
to get confused.

As a solution, we only split by new lines that are not surrounded by
quotes (since they represent a JSON property).

See: #997
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
@jviotti jviotti force-pushed the lines-split-nested-new-lines branch from 782433d to 5c388e7 Compare January 9, 2017 22:40
@jviotti jviotti merged commit 735478b into master Jan 10, 2017
@jviotti jviotti deleted the lines-split-nested-new-lines branch January 10, 2017 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant