elixir-lang/elixir

Deprecate usage of parse_transforms

josevalim opened this issue · 5 comments

Elixir supports Erlang parse transforms but if we want to eventually perform less compiler steps and even compile directly to core one day, we will no longer be able to support those.

If this is going to happen, we need good alternatives. The only two places, I've used parse transforms were to make :dbg.fun2ms/1 or :ets.fun2ms/1 work. If there are convenient alternatives for those two use cases, I see no downsides in going forward with this change.

@michalmuskala this may be a good starting point: https://github.com/ericmj/ex2ms

What do you folks think this will mean for elixir projects which use things like Erlang's lager library which leverages parse transforms to remove logging levels that are not desired for a given build type?

I am working on erlang-lager/lager#348 "Add docs about using lager in elixir" and that is how I stubbled upon this issue. I don't want to be recommending an approach that would not be supported in the near future.