rebar3



Build better Erlang.

Ask A Question

Questions

6
ANSWERED

Importing multi-app project

I have a project with multiple OTP apps in it. And I would like to import this project into another project via rebar dependency. And from the new project rebar3 could not see all subprojects defined in the first project. For example, `foo` is parent project and `bar` is trying to include `foo` into it. The app structure for foo looks like this. ``` root@900f642ef568:~/Developer/foo# rebar3 tree ===> Verifying dependencies... ├─ foo─0.1.0 (project app) ├─ foo_app1─0.1.0 (project app) ├─ foo_app2─0.1.0 (project app) └─ foo_app3─0.1.0 (project app) ``` And the directory structure looks like this: ``` root@900f642ef568:~/Developer/foo# tree -d . |-- apps | |-- foo_app1 | | `-- src | |-- foo_app2 | | `-- src | `-- foo_app3 | `-- src `-- src 8 directories ``` I am including this project into another project called bar and after doing `rebar3 get-deps` ``` root@900f642ef568:~/Developer/bar# tree -d . |-- _build | `-- default | `-- lib | `-- foo | |-- apps | | |-- foo_app1 | | | `-- src | | |-- foo_app2 | | | `-- src | | `-- foo_app3 | | `-- src | `-- src `-- src 13 directories ``` And my rebar tree looks like this: ``` root@900f642ef568:~/Developer/bar# rebar3 tree ===> Verifying dependencies... └─ bar─0.1.0 (project app) └─ foo─0.1.0 (git repo) ``` I would like to use `foo_app1` in this project bar (included this in `bar.app.src`). As you can see from the above `rebar3 tree` output, `foo_app1` is not listed as an app that is discovered. Because of which, when I try to launch `bar`, I get the error saying that ``` root@cello:~/Developer/bar# rebar3 shell ===> Verifying dependencies... ===> Compiling bar Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:0] [hipe] [kernel-poll:false] Eshell V9.2 (abort with ^G) 1> ===> The rebar3 shell is a development tool; to deploy applications in production, consider using releases (http://www.rebar3.org/docs/releases) ===> Failed to boot foo_app1 for reason {"no such file or directory", "foo_app1.app"} 1> ``` Can someone please help me how to make rebar3 see the app `foo_app1`?

Posted by Vasu Dasari 10 months ago