https://github.com/jechol/elixir-app-structures
Diff between `supervisor` and `non-supervisor` shows difference between modules w/ and w/o application.
https://github.com/jechol/elixir-app-structures
Last synced: 5 months ago
JSON representation
Diff between `supervisor` and `non-supervisor` shows difference between modules w/ and w/o application.
- Host: GitHub
- URL: https://github.com/jechol/elixir-app-structures
- Owner: jechol
- Created: 2017-02-09T08:37:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T20:21:56.000Z (over 2 years ago)
- Last Synced: 2025-03-23T23:39:15.993Z (about 1 year ago)
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### 1. non-supervisor vs supervisor
```shell
$ git difftool non-supervisor supervisor
```
### 2. flat
* `calc` provides `Calc.sum(a, b)`
* `echo` provides a process registered as `:echo`
* `my_app` uses `calc` and `echo` to provide `MyApp.echo_sum_of(a, b)`
```shell
$ git checkout flat && cd my_app
$ iex -S mix
iex> MyApp.echo_sum_of(10, 20)
:echo received 30
```
### 3. flat-conflict-deps
Pretty contrived, but `flat` branch with changes
* `calc` depends on `decimal 1.2.0`
* `echo` depends on `decimal 1.3.0`
```shell
calc $ mix deps.get # works
echo $ mix deps.get # works
my_app $ mix deps.get # error
```
### 4. umbrella
* `my_app` depends on `calc`, `echo`
* `my_another_app` depends on `my_app`
```shell
apps/my_another_app $ iex -S mix
iex> MyApp.echo_sum_of(10, 20)
:echo received 30
```
### 5. umbrella-dep-in-wrong-place
* `calc` uses `decimal`, but
* `decimal` is added in `echo` by mistake.
```shell
apps/calc $ iex -S mix
iex> Calc.sum(10, 20) # error
```
Not working on `apps/calc`.
``` shell
$ iex -S mix
iex> Calc.sum(10, 20) # works
```
Working on root. Broken dependencies are found when another app in umbrella depends on it.