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

showel.js - result: util.inspect( result ) - why? #16

Open
dimikot opened this issue Jan 24, 2012 · 4 comments
Open

showel.js - result: util.inspect( result ) - why? #16

dimikot opened this issue Jan 24, 2012 · 4 comments

Comments

@dimikot
Copy link

dimikot commented Jan 24, 2012

The resulting object is formed as:

{ result: util.inspect( result ), console: console } )

Why? I suppose it breaks the semantic: why to add additional quoting for the result at that level of abstraction (the more - with util.inspect, which is usable for debugging purposes, not for serialization)?

@bmeck
Copy link
Collaborator

bmeck commented Jan 24, 2012

Dmitry this is under large discussion on issue #8, we are redoing a
fair bit and will add a better serializer, right now it is that way
due to circular references, we are moving to fork and adding circular
reference support. Functions will still be stripped.

On Tue, Jan 24, 2012 at 10:22 AM, Dmitry Koterov
reply@reply.github.com
wrote:

The resulting object is formed as:

{ result: util.inspect( result ), console: console } )

Why? I suppose it breaks the semantic: why to add additional quoting for the result at that level of abstraction (the more - with util.inspect, which is usable for debugging purposes, not for serialization)?


Reply to this email directly or view it on GitHub:
#16

@dimikot
Copy link
Author

dimikot commented Jan 25, 2012

I suppose you should improve the serializer (and possibly deserializer at the caller side) around the whole

{ result: result, console: console }

construction, not around the result only! I am talking about that. Why additional quoting for one of inner fields?..

@bmeck
Copy link
Collaborator

bmeck commented Jan 25, 2012

It will be transparent in the future; it is currently stringified for the reasons above.

@lmorchard
Copy link

Might be nice to update the docs to reflect this, at least. The weird serialization kind of hit me out of left field

ExE-Boss pushed a commit to EB-Forks/mdn-browser-compat-toolkit that referenced this issue Jun 16, 2018
Seems to work not quite as expected, so this commit is for posterity and
I may revert shortly after. For some reason, Sandbox wraps output in
util.inspect(). See:

<gf3/sandbox#16>
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

No branches or pull requests

3 participants