Closed c-bik closed 6 years ago
Hi all,
This is more of a question than an issue. I couldn't think of a better place to ask this so here it is:
I am compiling/releasing an application with the following rebar.config:
{deps, [{jsx, {git, "https://github.com/talentdeficit/jsx", {tag, "v2.8.2"}}}, ]}. {recursive_cmds, [clean,eunit]}. {erl_opts, [ {parse_transform, lager_transform}, ... ]}. {relx, [ {release, {xyz, {semver, ""}}, [xyz]}, {dev_mode, true}, {extended_start_script, true}, {include_erts, true}, {overlay_vars, "config/vars.config"}, {overlay, [ {copy, "LICENSE", "LICENSE"}, {copy, "README.md", "README.md"}, ... ]} ]}. {xref_checks, [...]}. {shell, [...]}. {post_hooks, [...]}. {profiles, [ {prod, [ ... {relx, [{dev_mode, false}]} ]} ]}.
When I create a release with rebar3 as prod release, in the erlang console I get:
rebar3 as prod release
> jsx_decoder:module_info(compile). [{options,[debug_info, {d,maps_support}, {i,"/home/.../_build/default/lib/jsx/src"}, {i,"/home/.../_build/default/lib/jsx/include"}, {i,"/home/.../_build/default/lib/jsx"}]}, ... {source,"/home/.../_build/default/lib/jsx/src/jsx_decoder.erl"}]
However with old reltool it used to be:
reltool
> jsx_decoder:module_info(compile). [{options,[{outdir,"ebin"}, debug_info, {d,'RELEASE'}, {d,maps_support}, {i,"include"}]}, ... {source,"/home/.../deps/jsx/src/jsx_decoder.erl"}]
In release deployment, in case of a stacktrace, I am seeing that relx builds are producing full path instead of relative path (as it used to be with reltool)
relx
> try jsx:decode(a) catch _:_ -> erlang:get_stacktrace() end. [{jsx_decoder,value,4, [{file,"/home/.../_build/default/lib/jsx/src/jsx_decoder.erl"}, {line,234}]}, ... {shell,eval_loop,3,[{file,"shell.erl"},{line,627}]}]
as opposed to desired...
> try jsx:decode(a) catch _:_ -> erlang:get_stacktrace() end. [{jsx_decoder,value,4, [{file,"src/jsx_decoder.erl"},{line,234}]}, ... {shell,eval_loop,3,[{file,"shell.erl"},{line,626}]}]
Exposing full build path of a dev system doesn't look nice for a prod stacktrace (cosmetic).
My guess is, this is happening due to the missing {d,'RELEASE'}.
{d,'RELEASE'}
RELEASE
Please help/advice.
Thanks
This is being discussed in https://github.com/erlang/rebar3/pull/1695
Thanks. Closing this, as it needs to addressed in rebar3
rebar3
Hi all,
This is more of a question than an issue. I couldn't think of a better place to ask this so here it is:
I am compiling/releasing an application with the following rebar.config:
When I create a release with
rebar3 as prod release
, in the erlang console I get:However with old
reltool
it used to be:Problem
In release deployment, in case of a stacktrace, I am seeing that
relx
builds are producing full path instead of relative path (as it used to be with reltool)as opposed to desired...
Exposing full build path of a dev system doesn't look nice for a prod stacktrace (cosmetic).
My guess is, this is happening due to the missing
{d,'RELEASE'}
.relx
option/config to comile deps asRELEASE
so that full path infos are not generated?Please help/advice.
Thanks