-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Problem with inspect
and Node repl
#1387
Comments
Am I understanding correctly this is naming collision between |
It's not a naming collision. Node's But since Mind you that that in real running code this problem doesn't appear, but it does in development workflow when using Node repl to test things out. |
I see, thanks for clarification. It's not precise to say it's naming collision. As you said bit unsure if RxJS can do something about this other than add notes in document, but I may miss some possible solutions. Let's see if there's any suggestions around and if there isn't, I'll try to update document to include this topics. |
One option would be to rename |
Actually those naming pairs are more like relation between |
Node's
So one possible way is to do a arguments check in the Rx
But this would mean putting Node-specific workaround code into .ts files and all the compiled outputs. |
: Yes, that's where my hesitation comes in, node (dev) specific changes. I don't expect |
No, not automatically like in repl sessions. |
lol so node decided they own the word inspect. real great |
@trxcllnt it seems so. I was able to dig up some old issues (nodejs/node-v0.x-archive#410 (comment)) and it's decided to not to rename it something like |
/cc @Blesh also for visibility to conclude. I'm still voting to add note into README, do not add specific logics for this. |
I did want to mention that this problem extends outside of repl as well, as Node's version of
Produces:
As above, this shouldn't be used in production code as Personally I feel that this issue could be considered a bug with Node as opposed to RxJS, and wouldn't really expect any specific action within RxJS to deal with it. Perhaps it should be noted in the README as well for those left searching for solutions to RangeError bugs while developing. |
@tehnomaag @kennethlawrence from what I can tell, node's @Blesh @kwonoj since our |
... or we could just rename it. |
Yeah, given that the Any suggestions? |
@Blesh but I like inspect! :pouts: |
@Blesh From looking at the documentation and playing around with inspect, perhaps Auditing is synonymous with inspecting, but repeating an audit when there is no change in information will not produce anything new. In this case the action could be described as "auditing for new information". |
@Blesh @kennethlawrence 👍 for either duck type checking in inspect or |
Let me close this issue, by #1512 now |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I was trying to play with
rxjs
package in Node repl to compare it to v4 but kept on running intoRangeError: Maximum call stack size exceeded
errors.Specifically when objects implement
inspect
method but its not meant for inspection then problems might occur.For example with
rxjs
package:This is because Node's
util.inspect
(that repl uses to print expression return values) will try to calls.inspect
but that will recurse and throw an error.Fix is to disable
customInspect
option forutil.inspect
in Node repl as so:Now the same thing as above won't throw:
The
customInspect
option is documented here.I'm not sure if there's anything Rx lib can do to prevent this. But at least a workaround notice in readme would be helpful.
I was using Node 5.6.0 and RxJS 5.0.0-beta2.
The text was updated successfully, but these errors were encountered: