Closed sirihansen closed 7 years ago
Thanks for the report, i'll put in a PR to fix it asap.
Apart from the bug, what is the reasoning behind failing the relup generation due to warnings? Could it be considered to allow the warnings_as_errors option here, and only fail if this is set?
Isn't the warnings_as_errors
option a erlc
one? i suppose we could use in the context of release generation as well, another alternative would be not to error out in this case and report a successful release with the warnings exposed.
Yes, the warnings_as_errors
option is actually an erlc
option, but since erlc
calls systools for certain files, systools (e.g. systools:make_relup/4
) also obeys this option. I think it might be used in this situation.
@tsloughter @ferd is there a way for relx
to obtain rebar3
options residing in the rebar.config
or do they have to be explicitly passed?
@sirihansen #559 addresses the issue you've raised, with it relx
is formatting only the erts_vsn_changed
warning and just directly printing out any others, do you think the message is clear enough for these cases?
I think you might want to call Module:format_warning/1 (in the same way as relup_script_generation_error causes call to Module:format_error/1) - see the description of this under http://erlang.org/doc/man/systools.html#make_relup-4.
@sirihansen #559 has been updated
closing as #559 has since been merged
If
systools:make_relup/4
returns{ok, Relup, Module, Warnings}
, whereWarnings=/=[]
, then relx crashes withfunction_clause
inrlx_prv_relup:format_error/1
, since it does not handle the tagrelup_script_generation_warn
.Apart from the bug, what is the reasoning behind failing the relup generation due to warnings? Could it be considered to allow the
warnings_as_errors
option here, and only fail if this is set?