I need to convert AST with possible long binary to string.
Macro.to_string() uses Inspect and Inspect has the printable_limit option set to 4096 for binaries by default.
I am looking for the way to increase it so binary will not be truncated on to_string()
This seems like a bug in
Macro.to_string to me - it should print everything out. Could you open a bug report?
I believe this is already fixed in master. Until that’s released you can do
node, _ when is_binary(node) -> inspect(node, printable_limit: :infinity)
_, string -> string