Closed lrascao closed 7 years ago
I think this correction looks good now!
Two somehow related comments though:
since the options are hardcoded, I don't think that the two first clauses for the return value from systools are relevant. I.e. if you use option silent
, you should never get just an ok
or error
(unless using warnings_as_errors
, of course, but that's case is taken care of now).
you seem to write the relup file once more after receiving {ok,Relup,_,_}
(write_relup_file/3
). I see that it has been like this since the relup support was first added, and I guess it comes from the assumption that the relup file is not written when the Relup term i returned. This is the case when using option noexec
, but not when using option silent
.
Anyway, that was just some thoughts - no harm done, just some superfluous code...
yeah, my guess is that the silent
option was added after all that logic was already in place
@tsloughter this is ready for review
Looks good, but I'm a bit confused about the systools warnings_as_errors
. Is there a change in the works that we know of? And it seems to be saying that if you pass it that it simply will return the atom error
if there is a warning, and not the actual warnings/errors to display? Am I reading that comment correctly?
Looks good, but I'm a bit confused about the systools warnings_as_errors. Is there a change in the works that we know of?
This is the first step, the next one would be extracting the warnings_as_errors
option from rebar.config's erl_opts
and passing it to relx
And it seems to be saying that if you pass it that it simply will return the atom error if there is a warning, and not the actual warnings/errors to display? Am I reading that comment correctly?
Yes, this is an issue we found in systools:make_relup
, the least worst solution we found was handling warnings_as_errors
in relx
and deleting the relup that gets generated with the option is active
And it seems to be saying that if you pass it that it simply will return the atom error if there is a warning, and not the actual warnings/errors to display? Am I reading that comment correctly?
@lrascao @tsloughter A correction for this will be added in OTP-19.3, mid March.
Addresses #554