uwiger / parse_trans

Parse transform utilities for Erlang
Apache License 2.0
230 stars 118 forks source link

ct_expand-maps: support maps in ct_expand:term/1 #24

Closed fenollp closed 7 years ago

fenollp commented 7 years ago

Fixes https://github.com/uwiger/parse_trans/issues/23

uwiger commented 7 years ago

Hmm... parse_trans has no current dependency to jsx, but it's in examples/, which should be ok. Also, I like the example.

However, if you simply cd to examples/ and type make, compilation will break until you manually fetched jsx. This should be documented, at a minimum, or addressed in examples/Makefile.

fenollp commented 7 years ago

Hm I thought examples/ were not really ready for compilation, just to show the idea. What lead me to believe that is you can't make test -C examples/ due to this util file being missing.

Not sure how to add a test-time dependency on jsx with rebar2... What about I just mock the jsx call (replace it with something along json_decode("bla.json") -> (maps:from_list([]))#{<<"k">> => [42]}.)?

uwiger commented 7 years ago

Yeah, examples really should evolve into something testable, but I've been too lazy to do it. ;-)

fenollp commented 7 years ago

Updated. I can squash if you want.

uwiger commented 7 years ago

That's ok. Merged. Thanks.

fenollp commented 7 years ago

Thank you :) Could you publish on https://hex.pm/packages/parse_trans ?

uwiger commented 7 years ago

Done, version 3.1.0