Erlydtl to be replaced in relx

70 views
Skip to first unread message

Tristan Sloughter

unread,
May 2, 2015, 1:22:26 PM5/2/15
to erlware-...@googlegroups.com
I'm reaching out to learn if we have any push back in the community
around replacing erlydtl for overlays with mustache.

From what I've seen this is safe since erlydtl appears to be overkill
for every ones use of overlays. Features such as '.' access to subkeys
and '|join:' do not exist in mustache. But there are basic keys, lists
and booleans.

The reason or removing erlydtl is not simply it being overkill, but
that:

* It restricts supported Erlang versions greatly:
https://github.com/erlydtl/erlydtl/blob/master/rebar.config#L5
* It is large: saves 360K in the relx escript by removing. This is
actually a good savings for people on slow devices (like a raspberry pi)
and cuts the size of rebar3 escript below 1MB.
* It has deps like merl that require hackery
https://github.com/erlydtl/erlydtl/blob/master/rebar.config#L28

Any thoughts?

--
Tristan Sloughter
t...@crashfast.com

Tristan Sloughter

unread,
May 2, 2015, 2:24:54 PM5/2/15
to erlware-...@googlegroups.com, t...@crashfast.com

And...@bonusbox.me

unread,
May 2, 2015, 4:33:03 PM5/2/15
to erlware-...@googlegroups.com, t...@crashfast.com
how much 360K of saving will improve on raspberry or slow devices (in real seconds)
I would like to see first how big pain you want to solve.

I get your arguments about dependency and complexity behind of it (complexity which is now maintained on stable level)
but still... it is worth of braking backward compatibility?

I'm not sure about that.

Best Regards,
Andrzej

Tristan Sloughter

unread,
May 2, 2015, 4:42:13 PM5/2/15
to erlware-...@googlegroups.com, And...@bonusbox.me, t...@crashfast.com
I don't know exactly. I learned about this from someone using rebar3 (which includes relx as a dep) on a raspberry pi a month or so ago and forget who that was.

Some optimizations to the erl command helped as well so it was not as urgent a need to switch.

As for backwards compatibility, it only breaks features I really don't think anyone uses. If you use them, let me know. The main functionality remains the same {{var}}. Additionally it is the same as used in rebar2 for reltool overlays.

Tristan Sloughter

unread,
May 2, 2015, 7:28:18 PM5/2/15
to erlware-...@googlegroups.com, And...@bonusbox.me
Ok, I've been searching github for projects that have relx configs and use overlays. I found 75 total. 16 that use overlay_vars.
 
So far I've round 1 that would not work with mustache, https://github.com/thusfresh/switchboard/blob/master/files/app.config#L17
 
Even if it is only 1 project (obv this doesn't cover private repos, non-github, etc) I don't want to just break their config were they to upgrade their relx without getting in touch with them first.
 
Going to try getting in touch and will continue looking for more.
 
--
Tristan Sloughter
 

jtmo...@gmail.com

unread,
May 3, 2015, 6:18:35 PM5/3/15
to erlware-...@googlegroups.com, t...@crashfast.com, And...@bonusbox.me
I have zero objection to switching from erlydtl to mustache -- I can control the relx binary being used, and it would be easy to implement the behavior I wanted with mustache. But, 1/75. At least that's something.

Thanks for checking with me, and thanks for relx, it's a wonderful tool.
Reply all
Reply to author
Forward
0 new messages