You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I put a Kafka client inside of a Result.Ok, it fails to console.log and throws an exception from debug-representation.
Steps to reproduce
npm i kafka-node folktale
Then:
constkafka=require('kafka-node');constResult=require('folktale/result');a=newkafka.Client('some url');try{that=Result.Ok(a);// here's where it crashesconsole.log(that);}catch(e){console.error(e);}
Expected behaviour
Not throw.
Observed behaviour
It throws an error.
Environment
(Describe the environment where the problem happens. This usually includes:
OS: Mac OSX 10.12.6
JavaScript VM: Node v8.1.2
Folktale version: 2.0.1
)
Additional information
(Anything else you feel relevant to the issue)
The text was updated successfully, but these errors were encountered:
Further investigation reveals it could be the Kafka client class is just really large, and you get a RangeError: Maximum call stack size exceeded if you dig into the objectToKeyValuePairs in debug-representation.js. Still debugging...
Still reading the code, so bear with me; for Node could we fall back to inspect which has depth, else have a custom browser one that handles depth? I haven't really looked at Object inspectors for the browser in a long while so not sure what options we have there.
We could, but then we'd be limited to how Node prints objects. Since Node doesn't know about Folktale's unions, the representation would look kinda like JSON.stringify's, which is less useful here.
When I put a Kafka client inside of a Result.Ok, it fails to console.log and throws an exception from debug-representation.
Steps to reproduce
npm i kafka-node folktale
Then:
Expected behaviour
Not throw.
Observed behaviour
It throws an error.
Environment
(Describe the environment where the problem happens. This usually includes:
)
Additional information
(Anything else you feel relevant to the issue)
The text was updated successfully, but these errors were encountered: