Reputation: 53940
I am trying to integrate rebar3 into my project, but for some reason, I can't make it find and resolve dependencies when running the app.
Dependencies are downloaded and put in the respective folders in the project and the app compiles without errors, but then functions from dependencies are undefined if I call them from inside the project app or from the Erlang REPL.
I think I am missing some small point, but can't figure out what exactly.
My rebar.config is as simple as this:
{erl_opts, [debug_info]}.
{
deps, [
{jsx}
]
}.
{cover_enabled, true}.
The project repo is here.
Can you please share a link to a simple example project where dependencies are present in the rebar.config and are successfully used in the app code?
Upvotes: 2
Views: 794
Reputation: 222398
but then functions from dependencies are undefined if I call them from inside the project app or from the Erlang REPL
In order to load all the dependencies in the REPL, you need to start the REPL using rebar3 shell
. rebar3 shell
invokes erl
with the correct arguments so that the paths of all of the project's dependencies are added to Erlang's Code Path. The command also accepts many flags and arguments; you can see the full list and description by running rebar3 help shell
.
Upvotes: 1