bitwalker / bitwalker/distillery
Improve error message when application is forgotten from the included_applications list
- Dominant language
- Elixir
- Stars
- 3k
- Forks
- 398
- PR merge metrics
- No merged PRs in 30d
Description
### Steps to reproduce
Create 3 mix projects: `a`, `b`, and `test`. `test` depends on `a` and `b`. `b` depends on `a`. Add `a` to the `included_applications` list in `test`. Build a release in `test`.
For convenience, clone this repository: https://github.com/fhunleth/included_app_test
```sh
cd test
mix deps.get
mix release
```
You should get an error:
```text
==> Release failed, during .boot generation:
Circular dependencies among applications: [{test,"0.1.0"},{b,"0.1.0"}]
```
### Verbose Logs
Paste the output of the release command you ran with the `--verbose` flag
below in the summary tags (this helps keep the issue easy to navigate):
```
$ mix release --verbose
==> Loading configuration..
==> Assembling release..
==> Building release test:0.1.0 using environment dev
==> Discovered applications:
> kernel-6.0.1
|
| from: /home/fhunleth/.asdf/installs/erlang/21.0.8/lib/kernel-6.0.1
| applications: none
| includes: none
|_____
> artificery-0.2.6
|
| from: _build/dev/lib/artificery
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> distillery-2.0.10
|
| from: _build/dev/lib/distillery
| applications:
| :kernel
| :stdlib
| :elixir
| :runtime_tools
| :artificery
| includes: none
|_____
> runtime_tools-1.13
|
| from: /home/fhunleth/.asdf/installs/erlang/21.0.8/lib/runtime_tools-1.13
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> stdlib-3.5.1
|
| from: /home/fhunleth/.asdf/installs/erlang/21.0.8/lib/stdlib-3.5.1
| applications:
| :kernel
| includes: none
|_____
> a-0.1.0
|
| from: _build/dev/lib/a
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| includes: none
|_____
> b-0.1.0
|
| from: _build/dev/lib/b
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :a
| includes: none
|_____
> logger-1.7.3
|
| from: /home/fhunleth/.asdf/installs/elixir/1.7.3-otp-21/bin/../lib/logger
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> test-0.1.0
|
| from: _build/dev/lib/test
| applications:
| :kernel
| :stdlib
| :elixir
| :logger
| :b
| :distillery
| includes:
| :a |_____
> compiler-7.2.3
|
| from: /home/fhunleth/.asdf/installs/erlang/21.0.8/lib/compiler-7.2.3
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> sasl-3.2
|
| from: /home/fhunleth/.asdf/installs/erlang/21.0.8/lib/sasl-3.2
| applications:
| :kernel
| :stdlib
| includes: none
|_____
> iex-1.7.3
|
| from: /home/fhunleth/.asdf/installs/elixir/1.7.3-otp-21/bin/../lib/iex
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> mix-1.7.3
|
| from: /home/fhunleth/.asdf/installs/elixir/1.7.3-otp-21/bin/../lib/mix
| applications:
| :kernel
| :stdlib
| :elixir
| includes: none
|_____
> elixir-1.7.3
|
| from: /home/fhunleth/.asdf/installs/elixir/1.7.3-otp-21/bin/../lib/elixir
| applications:
| :kernel
| :stdlib
| :compiler
| includes: none
|_____
==> Running validation checks..
> Mix.Releases.Checks.Erts * PASS
> Mix.Releases.Checks.Cookie * PASS
> Mix.Releases.Checks.LoadedOrphanedApps * PASS
==> Generated overlay vars:
release_name=:test
release_version="0.1.0"
is_upgrade=false
upgrade_from=:latest
dev_mode=true
include_erts=false
include_src=false
include_system_libs=false
erl_opts=""
run_erl_env=""
erts_vsn="10.0.7"
output_dir="_build/dev/rel/test"
==> Copying applications to _build/dev/rel/test
==> Generating start_erl.data
==> Generating vm.args
==> Generating sys.config from config/config.exs
==> Generating boot scripts
==> Release failed, during .boot generation:
Circular dependencies among applications: [{test,"0.1.0"},{b,"0.1.0"}]
```
### Description of issue
- What are the expected results?
I'm expecting an error, but it would be really nice if it could point to the `included_applications` being the issue. For example, maybe something like "`a` is in the included_applications, but `b` which depends on `a` is not."
- What version of Distillery?
2.0.10
- What OS, Erlang/Elixir versions are you seeing this issue on?
Linux, Erlang 21.1, Elixir 1.7.3
- If possible, also provide your `rel/config.exs`, as it is often
my first troubleshooting question, and you'll save us both time :)
See linked repository
- Is there documentation that says one thing, but Distillery does
another? If so, please link the doc here so it can be updated if
it's a documentation issue, or so that the fix can be based around
what's documented.
- If this is a runtime configuration issue, please also provide your config file
(with any sensitive information stripped of course). This is almost
always necessary to understand why some configuration may not be working.
If you do not provide the above information and I need it to help troubleshoot, it may delay things significantly,
as I will have to ask you for all of these things anyway. Help me help you!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.