Skip to content
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

Fix rebar3 release #5

Merged
merged 2 commits into from
Apr 19, 2019
Merged

Conversation

vasu-dasari
Copy link
Contributor

@vasu-dasari vasu-dasari commented Apr 3, 2019

release build under rebar3 does not process any provider hooks, and hence some configuration like the following would not call rebar_mix provider to be able to inject elixir libraries.

{provider_hooks, [
{pre, [{compile, {mix, find_elixir_libs}}]}, => callbacks during 'compile' phase get called
{pre, [{release, {mix, find_elixir_libs}}]} => This will not callback find_elixir_libs
]}.

Given this, relx configuration in rebar_state needs to be updated with Elixir lib_dirs. This can be done from rebar_mix module as part of init callback. This solution does that.

"rebar3 shell" command is failing because of ERL_FLAGS being set in "hooks" related code, where it is not needed. So, wrote a custom sh() function which resets ERL_FLAGS to [] before doing whatever, sh() wanted to do.
`release` build under rebar3 does not process any provider hooks, and hence some configuration like the following would not call rebar_mix provider to be able to inject elixir libraries.

{provider_hooks, [
    {pre,  [{compile, {mix, find_elixir_libs}}]}, => callbacks during 'compile' phase get called
    {pre,  [{release, {mix, find_elixir_libs}}]}  => This will not callback find_elixir_libs
]}.

Given this, `relx` configuration in `rebar_state` needs to be updated with Elixir lib_dirs. This can be done from `rebar_mix` module as part of init callback. This solution does that.
@tsloughter tsloughter merged commit c78a70e into Supersonido:master Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants