Closed SebCav closed 2 years ago
I looked into this and while turning the crash into a useful error message is easy (just append a catch_all clause to rlx_overlay:do_individual_overlay/4
), it turns out that getting the error message to the console (and failing the release
task) is harder.
code in relx:build_release_/3
(which is the only consumer of overlay functionality) ignores errors returned by rlx_overlay:render/2
.
As a result anything that goes wrong in the overlay task but does not result in a crash fails silently.
with #916 merged, the command sequence
rebar3 new release foo; cd foo
sed -i.bak 's/%% use minimal mode to exclude ERTS/\,{overlay, [this_is_a_malformed_entry]}/' rebar.config
rebar3 as prod release
results in
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling foo
===> Assembling release foo-0.1.0...
===> Release successfully assembled: _build/prod/rel/foo
===> Overlay section malformed: this_is_a_malformed_entry
Great work, thank you!
Hi, rebar3 crashes with "uncaught error in rebar.code" triggered by relx when an overlay contains something like
{copy, "<path1> <path2>"}
instead of{copy, "<path1>", "<path2">}
. A nice error would ease debugging when this thing happens...