Comments (8)
Relx itself supports {debug_info, strip | keep}
and it defaults to strip
in a prod profile. Just set it to keep
at the same level as your include_erts
option and it should be okay.
from rebar3.
so you mean I should use :
{profiles,
[{prod,
[{erl_opts,[{d,'PROD'}, {debug_info, keep}]},
{relx,[{include_erts,true}]}]},
from rebar3.
Or should I add the keep
option in the default erl_opts section ?
from rebar3.
I've tried to add it to the default erl_opts section so now I have this 👍
{erl_opts,[warn_unused_vars,warn_export_all,warn_shadow_vars,
warn_unused_import,warn_unused_function,warn_bif_clash,
warn_unused_record,warn_deprecated_function,warn_obsolete_guard,
strict_validation,warn_export_vars,warn_exported_vars,
warn_untyped_record,warnings_as_errors,{debug_info, keep},
{parse_transform,lager_transform},
{lager_truncation_size,200000},
{lager_extra_sinks,[audit,security,access,shelllog]},
warn_missing_spec_all]}.
It looks like abstract code is still not included in the beam files:
1> beam_lib:chunks("ana.beam", [abstract_code]).
{ok,{ana,[{abstract_code,no_abstract_code}]}
from rebar3.
Ok, thanks, I got it now. It should be put under /profiles/prod/relx
, so it will look like:
[{prod,
[{erl_opts,[{d,'PROD'},deterministic]},
{relx,[{dev_mode,false},{include_erts,true}, {debug_info, keep}]}]},
with this option it works. Unfortunately the abstract code must be included both on the base and target releases, and because of this we should modify and retag one of our old releases. Can I pass the same option somehow to relx so I don't need to modify the rebar.config belonging to the base release?
from rebar3.
In case there are no such options in relx, it's fine, we will delete the existing tag, and recreate it with this small modification, so in that case the ticket could be closed.
from rebar3.
relx works on the pre-built artifacts only, and the option is to strip or keep things. Relx itself does not dictate whether the debug_info is included in the first place, only whether it is taken away.
It's a bit odd of a feature, but it's a general thing that was borrowed from reltool if I recall properly.
Good if it works though, glad to hear that.
from rebar3.
Thanks for the help. The ticket can be closed now.
from rebar3.
Related Issues (20)
- Executing rebar3 throwing escript exception HOT 1
- Templates not found on Fedora Linux HOT 4
- `rebar3 tree` formats its output very badly when called together with OTP26 HOT 4
- Question: Sharing modules between multiple applications
- Many [r3_hex_http] ... is deprecated in favour of ... messages during compilation and upgrades HOT 1
- are there checksum available ? HOT 4
- Escript creation failure reason swallowed by post-hook failure. HOT 1
- Possible error in rebar_core HOT 1
- Uncaught error in rebar_core when running rebar3 shell HOT 1
- when use -name, remote_console connect failed HOT 1
- "Did you mean ...?" suggestions for misspelled commands HOT 7
- rebar3 auto: Error loading module enotify HOT 1
- Tag usage in newer rebar3 versions HOT 14
- Hooks env variables documentation HOT 1
- {mode, ...} overrides variables explicitly set in the profile
- rebar3 killed spawned processes after compile HOT 1
- Dependency post_hooks clean override not executed. HOT 3
- `rebar3 version` compiles dependencies before outputting value HOT 5
- cover aggregation bug HOT 6
- `REBAR_SRC_DIRS` not available in hook HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rebar3.