erlang / rebar3

Erlang build tool that makes it easy to compile and test Erlang applications and releases.
http://www.rebar3.org
Apache License 2.0
1.69k stars 515 forks source link

dev_mode overrides debug_info option #2739

Open weiss opened 2 years ago

weiss commented 2 years ago

Using Rebar3 3.19.0 on OTP 25, I run rebar3 new app example and replace the rebar.config with the following contents:

{relx,
 [{release, {example, "0.1.0"}, [example, sasl]},
  {dev_mode, true}, % Overrides {debug_info, strip} (in profiles as well!).
  {debug_info, strip}]}.

{profiles,
 [{foo,
   [{relx,
     [{dev_mode, false},
      {debug_info, strip}]}]}]}.

Both rebar3 release and rebar3 as foo release now yield beam files that are not stripped. Setting {dev_mode, false} for the default profile fixes the issue for both profiles.

Using the mode option fixes the problem as well; e.g., files are stripped for the following profile:

  {bar,
   [{relx,
     [{mode, prod}]}]}

This issue seems unrelated to #2598.

tsloughter commented 2 years ago

Thanks, definitely a bug.