Hi, I noticed Absinthe tests failing when using Elixir 1.19.0-rc.2. After some investigation the issue seems to be a change in behaviour of Macro.escape/2 when using the :unquote option. For example, evaluating this expression:
iex> Macro.escape(%{field: {:unquote, [], [:test]}}, unquote: true)
Elixir 1.18: {:%{}, [], [field: :test]}
Elixir 1.19: {:%{}, [], [field: {:{}, [], [:unquote, [], [:test]]}]}
It seems that in 1.19 the unescaping only works when the parent node doesn’t need escaping. Macro.escape([{:unquote, [], [:test]}], unquote: true) for example results in [:test]
I noticed the added line in the documentation “Note this option will give a special meaning to quote/unquote nodes, which need to be valid AST before escaping.”, but to me it’s not entirely clear if this is the intended behaviour, as it is a breaking change, so I was wondering if anybody can confirm this is expected?




















