iskanderknani2005-oss commented on issue #39006:
URL: https://github.com/apache/superset/issues/39006#issuecomment-4169814059

   @dosu Thanks for the clarification. I understand now that the silent 
omission is intentional per the docstring, and that the memory concern around 
the Set is not an actual leak since it is scoped to a single call. That said, I 
agree that silently dropping keys is a poor default for debuggability, so I'd 
like to contribute the fix you suggested. In the safeStringify.ts file, I will 
update the JSDoc comment to reflect the new behavior by replacing the sentence 
that says circular references are "simply omitted" with one that says they are 
replaced with a '[Circular]' placeholder. Then, inside the catch block, I will 
add a console.warn that logs a warning message including the key name where the 
circular reference was detected. Finally, I will change the return; statement 
in that same catch block to return '[Circular]' so that instead of silently 
dropping the key, the function preserves it with a clearly visible marker. I 
will also check the duplicate implementation in the DeckGL plug
 in and apply the same fix there for consistency.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to