使用 Rebar3 的项目的工作示例

A working example of a project using Rebar3

我正在尝试将 rebar3 集成到我的项目中,但由于某些原因,当 运行 应用程序时,我无法让它找到并解决依赖项。

依赖项已下载并放入项目中的相应文件夹中,应用程序编译无误,但如果我从项目应用程序内部或从 Erlang REPL 调用依赖项中的函数,则它们是未定义的。

我想我遗漏了一些小问题,但无法弄清楚到底是什么。

我的rebar.config就是这么简单:

{erl_opts, [debug_info]}.
{
  deps, [
  {jsx}
]
}.
{cover_enabled, true}.

项目回购是 here

能否分享一个 link 到一个简单的示例项目,其中依赖项存在于 rebar.config 中并在应用程序代码中成功使用?

but then functions from dependencies are undefined if I call them from inside the project app or from the Erlang REPL

为了加载REPL中的所有依赖,您需要使用rebar3 shell启动REPL。 rebar3 shell 使用正确的参数调用 erl,以便将所有项目依赖项的路径添加到 Erlang 的 Code Path。该命令还接受许多标志和参数;您可以通过 运行 rebar3 help shell.

查看完整列表和描述