quentusrex2mo ago

How to debug usage of deno_core?

I'm looking into an issue with the charming rust crate, where when trying to use echarts through deno_core to create a scatter plot, only 400 of the points are being generated. There is an issue filed here: https://github.com/yuankunzhang/charming/issues/20 Any info on how to enable logging to a file, or console? I've been stepping through the code, after changing dependencies to use local copy of deno_core, and I've ended up with a bunch of println's, but still not seeing how to simply enable logging to console. Nor have I seen where this 400 points limitation would be located. I've confirmed that the data being passed into deno does have the full 500 points in my local test. Also, when using echarts in wasm and html, all the data points are properly rendered. Only missing when using ImageRenderer, which is using deno. Is there some serde configured limitation?
ImageRenderer only renders the first 400 points in a scatter grap...
Reproducer: use std::iter; use charming::{component::Axis, element::AxisType, series::Scatter, Chart, ImageRenderer}; fn main() { let c = Chart::new() .xaxis(Axis::new().type(AxisType::Value)) .y...
2 Replies
Deno AI Helper
Deno AI Helper2mo ago
I apologize, but I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, I can offer some general advice that might help you with debugging in Deno. For logging to a file or console in Deno, you typically use the standard console API for logging to the console, such as console.log(), console.warn(), console.error(), etc. To log to a file, you would usually open a file for writing and use the Deno.write() or Deno.writeSync() functions to write your logs to the file. Remember that you need the appropriate permissions to write to the filesystem when running your Deno script. Regarding the issue with the 400 points limitation, without specific details on how deno_core and the charming crate are implemented, it's difficult to pinpoint the exact cause. However, it's possible that there might be some internal limitation or a bug within the ImageRenderer or the way it interacts with deno_core. Since you've mentioned serde, it's worth checking if there's any serialization or deserialization limit set by default that could be affecting the number of points being processed. Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of the advice given. For more in-depth assistance, you might want to consider reaching out to the maintainers of the charming crate or the Deno community for help with this specific issue.
quentusrex2mo ago
And, thumbsdowning the AI response gets an "this interaction failed" error... :/ does deno_core have any internal tracing, or logging functionality?