erlang - 如何: use a specific app from a different project as a dep

标签 erlang rebar3

我正在尝试使用另一个项目 (proj2) 的 dep 来编译我的应用程序 (app_1),该项目包含一些应用程序(例如 app_a、app_b、app_c...)。

proj2 有一个应用程序文件夹,其中包含所述应用程序(app_a 等)。

我正在尝试获取app_a,但它也取决于app_b。 无论我做什么,我似乎都无法让它发挥作用。

在 app_1 的 rebar.config 中使用它:

{deps, [{proj2, {git, "git://github.com/scm/pr/proj2", {branch, "master"}}}]}.

我明白了

Dependency failure: source for proj2 does not contain a recognizable project and can not be built

使用 app_a 而不是 proj2 进行类似尝试,添加/apps/app_a 路径等没有帮助。 运行 rebar3 3.12.0。

任何有关如何可能的帮助将不胜感激。谢谢

最佳答案

对于 rebar3 3.12.0,我认为这是不可能的。您也许可以通过使用 rebar3.config.script 文件来让它工作,该文件在将依赖项放在 rebar3 可以找到的地方之前手动下载依赖项。


rebar3 3.14.0 引入了 git_subdir 依赖类型,如下所示:

{deps, [{proj2, {git_subdir, "git://github.com/scm/pr", {branch, "master"}, "proj2"}}]}.

documentation on dependencies 中的示例中提到了这一点,但没有太多细节。

因此,如果您能够升级到较新的 rebar3 版本,那么可能值得尝试。

关于erlang - 如何: use a specific app from a different project as a dep,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66321433/

相关文章:

erlang - RabbitMQ:安装客户端库 erlang

erlang - Erlang 的欧拉项目 #3

erlang - 如何在 yaws 文件中包含 yaws 文件

erlang - 使用Rebar3 Common Test在include文件夹中找不到hrl文件,但eunit却找到

intellij-idea - IntelliJ : Unresolved function for dependencies module

functional-programming - 二郎 : Returning from a function

database - Erlang 更好地支持哪个数据库(SQL)?

erlang - 你如何在生产环境中初始化 mnesia?

erlang - 如何在 Erlang escript 中设置代理?

erlang - 降级 Erlang/OTP 后加载/重新编译 Rebar 模块