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
warning: Macro.to_string/2 is deprecated. Use Macro.to_string/1 instead
lib/erl2ex/pipeline/codegen.ex:505: Erl2ex.Pipeline.Codegen.expr_to_string/1
There is no suitable replacement (or the docs are missing) for code that used Macro.to_sting/2 with custom changes to code output. Clearly Macro.to_string/1 cannot be used instead.
Expected behavior
No deprecation or otherwise a suitable warning pointing to how a similar effect can be achieved with Inspect.Algebra.format and Code.quoted_to_algebra. An example in Code.quoted_to_algebra docs would also help.
The text was updated successfully, but these errors were encountered:
We have replaced it on ExDoc and Ecto. The approaches are usually by doing a pre-pass on the data or a post-pass on the output. From a quick look at erl2ex, you could do a prewalk that matches on {:?, metadata, Elixir} and return a new variable that will be printed as is. If that's not enough, then please expand and I will be glad to help find a solution. In the worst case scenario you can part the Macro.to_string functionality. :)
Environment
Erlang/OTP 24 [erts-12.1.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]
Elixir 1.13.0-rc.0 (48b838a) (compiled with Erlang/OTP 24)
Current behavior
There is no suitable replacement (or the docs are missing) for code that used
Macro.to_sting/2
with custom changes to code output. Clearly Macro.to_string/1 cannot be used instead.Expected behavior
No deprecation or otherwise a suitable warning pointing to how a similar effect can be achieved with Inspect.Algebra.format and Code.quoted_to_algebra. An example in Code.quoted_to_algebra docs would also help.
The text was updated successfully, but these errors were encountered: