bitwalker / distillery

Simplify deployments in Elixir with OTP releases!
MIT License
2.96k stars 398 forks source link

Improve error message when application is forgotten from the included_applications list #569

Open fhunleth opened 5 years ago

fhunleth commented 5 years ago

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

cd test
mix deps.get
mix release

You should get an error:

==> 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

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."

2.0.10

Linux, Erlang 21.1, Elixir 1.7.3

See linked repository

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!