https://github.com/billstclair/rebar3-app-dependency
A demonstration of how inter-application depedencies affect rebar3's compile order
https://github.com/billstclair/rebar3-app-dependency
Last synced: about 1 month ago
JSON representation
A demonstration of how inter-application depedencies affect rebar3's compile order
- Host: GitHub
- URL: https://github.com/billstclair/rebar3-app-dependency
- Owner: billstclair
- License: other
- Created: 2015-10-09T01:29:23.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-09T07:48:55.000Z (over 10 years ago)
- Last Synced: 2025-03-02T19:43:06.160Z (over 1 year ago)
- Language: Erlang
- Size: 813 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
rebar3-app-dependency
=====
This directory has two sub-directories, each of which is a trivial
Erlang application with four sub-applications. I made it to illustrate
how the order of compilation for
[rebar3](https://github.com/rebar/rebar3) depends on dependencies in
the .app.src files, but _not_ on their order in any application that
depends on them.
`rebar3-app-test` has the following `.app.src` file:
```
{application, 'rebar3-app-test',
[...
{applications,
[kernel,
stdlib,
app21, app13, app42, app34
]},
]}.
```
The four sub-apps each include only `kernel` and `stdlib` in their
`applications` list. The build looks like this:
```
$ cd .../rebar3-app-test
$ ./rebar3 compile
===> Verifying dependencies...
===> Compiling app42
===> Compiling app34
===> Compiling app21
===> Compiling app13
===> Compiling rebar3-app-test
```
Note that the compile order does _not_ match the order in the
`.app.src` file.
`rebar-related-app-test` has the following `.app.src` file:
```
{application, 'rebar3-related-app-test',
[...
{applications,
[kernel,
stdlib
]},
]}.
```
Its four sub-applications depend on each other in a chain, where
`a->b` means that `a` has `b` in the `applications` list in its
`.app.src` file:
```
app34 -> app13 -> app42 -> app21
```
The build looks like this
```
$ cd .../rebar3-related-app-test
$ ./rebar3 compile
===> Verifying dependencies...
===> Compiling app21
===> Compiling app42
===> Compiling rebar3-related-app-test
===> Compiling app13
===> Compiling app34
```
Note that the dependencies changed the order of compilation of the
sub-applications, but since the `rebar3-related-app-test` application
depends on none of the sub-applications, it is compiled in a random
place relative to them.
`tristan` said on `#rebar` that this is as designed.