【发布时间】:2016-07-10 04:20:00
【问题描述】:
我的目标是获取所有依赖项并在我的本地计算机上运行 riak_ensemble。但是,当我运行 rebar get-deps 时,我总是遇到:
Cloning into 'neotoma'... ERROR: Dependency dir /home/project/riak/riak_ensemble_demo/deps/cuttlefish/deps/neotoma failed application validation with reason: {version_mismatch,{"/home/agung/project/riak/riak_ensemble_demo/deps/cuttlefish/deps/neotoma/src/neotoma.app.src",
{expected,"1.7.3"},
{has,"1.7.2-9-g2f2b8e6"}}}.
错误指向一个新版本的neotoma。问题是 neotoma 在其存储库中有该版本。这是存储库的屏幕截图:
这是我用于墨鱼的 rebar.config 文件
{require_otp_vsn, "R16|17|18"}.
{erl_opts, [warnings_as_errors, {parse_transform, lager_transform}, debug_info, warn_untyped_record]}.
{eunit_opts, [verbose]}.
{cover_enabled, true}.
{escript_emu_args, "%%! -escript main cuttlefish_escript -smp disable +A 0\n"}.
{escript_incl_apps, [goldrush, getopt, lager]}.
{xref_checks, []}.
{xref_queries, [{"(XC - UC) || (XU - X - B - \"(rebar.*|mustache)\" : Mod)", []}]}.
{deps, [
{getopt, ".*", {git, "git://github.com/jcomellas/getopt.git", {tag, "v0.8.2"}}},
{lager, "(2.0|2.1|2.2).*", {git, "git://github.com/basho/lager.git", {tag, "2.2.0"}}},
{neotoma, "1.7.3", {git, "git://github.com/seancribbs/neotoma.git", {tag, "1.7.3"}}}
]}.
{post_hooks, [
{"-win32", compile, "rebar escriptize"},
{"^((?!-win32).)*$", compile, "./rebar escriptize"}
]}.
[更新] 这是我的 riak_ensemble_demo 的 rebar.config
{erl_opts, [debug_info,
warnings_as_errors,
{parse_transform, lager_transform}]}.
{deps, [{lager, "2.0.3", {git, "git://github.com/basho/lager.git", {tag, "2.0.3"}}},
{riak_ensemble, ".*", {git, "git://github.com/basho/riak_ensemble", {branch,"develop"}}}]}.
然后我运行 rebar get-deps 来满足所有需要的依赖项。
如何实现这种依赖关系?谢谢!
【问题讨论】:
-
据我所知,它是“墨鱼”的 rebar.config。您能否向我们展示 /home/project/riak/riak_ensemble_demo 中的 rebar.config 并告诉我们您如何构建您的应用程序?
-
嗨@P_A,我已经更新了问题。