Giter Club home page Giter Club logo

Comments (8)

ferd avatar ferd commented on May 30, 2024

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.

tothlac avatar tothlac commented on May 30, 2024

so you mean I should use :

{profiles,
    [{prod,
         [{erl_opts,[{d,'PROD'}, {debug_info, keep}]},
          {relx,[{include_erts,true}]}]},

from rebar3.

tothlac avatar tothlac commented on May 30, 2024

Or should I add the keep option in the default erl_opts section ?

from rebar3.

tothlac avatar tothlac commented on May 30, 2024

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.

tothlac avatar tothlac commented on May 30, 2024

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.

tothlac avatar tothlac commented on May 30, 2024

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.

ferd avatar ferd commented on May 30, 2024

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.

tothlac avatar tothlac commented on May 30, 2024

Thanks for the help. The ticket can be closed now.

from rebar3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.