Closed sg2342 closed 2 years ago
unfortunately i forgot to check for the presence of beam_lib:strip_release/2 in older OTP releases. beam_lib:strip_release/2 was introduced in OTP 22.0; this makes this PR useless.
i think the 'debug_info' 'strip' | 'keep' option is dangerously named (it does strip debug_info but also everything else). and i also think the fact that {debug_info, strip} makes the created release uninstallable by release_handler should be documented somewhere.
Definitely should be documented, but we should only be supporting 22+ anyway, so you should reopen this PR and can remove anything older than 22 from CI.
the inclusion of this change in a new rebar3 release would fix erlang/rebar3#2558
@tsloughter : is there anything i can do to bring this and #907 forward?
Just poking me :). Sorry about that.
I think it makes sense to merge this as is but I'm curious about why strip_release
wouldn't by default keep attributes if they are needed by install
. I'm guessing their answer would be that it could be called after the release is installed, but still worth bringing up.
Also probably worth making it configurable so a user can configure a list of what to keep.
But that can be a separate PR.
Also probably worth making it configurable so a user can configure a list of what to keep.
But that can be a separate PR.
there is a related work happening in reltool: https://github.com/erlang/otp/pull/5936 (but otoh reltool does the debug_strip on file by file basis)
Oh, thanks, I've also commented there about this now.
release_handler:install_release/1 depends on the 'vsn' attribute in the beam files of the to-be-installed release.
Without this, a release created with {debug_info, strip} (which is the default in rebar3 'prod' and 'minimal' modes) cannot be installed by the release_handler.