-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
relx opt should not sort #2490
base: main
Are you sure you want to change the base?
relx opt should not sort #2490
Conversation
This can't be accepted without tests at least showing the behaviour you wish to change |
Yea, and I'd be surprised if this was an accurate fix to your issue. I know we've had issues with sorting before but really thought at this point we had it right -- though certainly possible that the relx 4.0 changes could have messed something up. So you may want to provide an example of your config you are having issues with before writing tests, so we can go over it and make sure this is the right direction. |
With the example of this page
Create a new release with simple rebar.config {erl_opts, [debug_info]}.
{deps, []}.
{relx, [{release, {rlex_test, "0.1.0"},
[rlex_test,
sasl]},
{mode, dev},
%% automatically picked up if the files
%% exist but can be set manually, which
%% is required if the names aren't exactly
%% sys.config and vm.args
{sys_config, "./config/sys.config"},
{vm_args, "./config/vm.args"}
%% the .src form of the configuration files do
%% not require setting RELX_REPLACE_OS_VARS
%% {sys_config_src, "./config/sys.config.src"},
%% {vm_args_src, "./config/vm.args.src"}
]}.
{profiles, [{prod, [{relx,
[%% prod is the default mode when prod
%% profile is used, so does not have
%% to be explicitly included like this
{mode, prod},
{debug_info, keep}
%% use minimal mode to exclude ERTS
%% {mode, minimal}
]
}]}]}. If sort opts, the {state_t,"/home/dual/learn/rlex_test",
"/home/dual/learn/rlex_test/_build/prod/rel",[],[],#{},
"/home/dual/learn/rlex_test/config/vm.args",undefined,
"/home/dual/learn/rlex_test/config/sys.config",undefined,[],[],[],
strip,
#{{rlex_test,"0.1.0"} =>
{release_t,rlex_test,"0.1.0",undefined,
[{rlex_test,#{included_applications => undefined,
name => rlex_test,type => undefined,
vsn => undefined}},
{sasl,#{included_applications => undefined,
name => sasl,type => undefined,
vsn => undefined}}],
false,[],[],undefined,[]}},
#{},false,true,true,undefined,false,true,true,false,[],true,
[{profile_string,"prod"}],
[{base_dir,"/home/dual/learn/rlex_test/_build/prod"}],
true,[],[],true,undefined,false,prod,true} and the debug_info option is |
relx options should not be sort, otherwise, the right override strategy will not work.