Closed ymtszw closed 5 years ago
Digging issues, found this one: #534
https://github.com/bitwalker/distillery/blob/2.0.9/lib/mix/lib/releases/models/release.ex#L15-L30
applications: [
# required for elixir apps
:elixir,
# included so the elixir shell works
:iex,
# required for Mix config provider
:mix,
# required for upgrades
:sasl,
# required for some command tooling
:runtime_tools,
# needed for config provider API
:distillery
# can also use `app_name: type`, as in `some_dep: load`,
# to only load the application, not start it
],
So basically, to provide config provider feature, distillery currently depends on :mix
, and set itself up as a runtime application in release.
Config provider feature is lifted to stdlib in Elixir 1.9.0, and it is reframed as standalone module so that it will not depend on Mix anymore.
Thus, this problem should naturally resolve when we migrate to mix release
in Elixir 1.9.0, I believe.
Steps to reproduce
mix phx.new disttest
cd disttest
{:distillery, "~> 2.0", runtime: false}
in mix.exs anddeps.get
mix release.init
MIX_ENV=prod DATABASE_URL=foobar SECRET_KEY_BASE=foobar mix release
cat _build/prod/rel/disttest/releases/0.1.0/disttest.rel
mix
,distillery
,artificery
includedMIX_ENV=prod DATABASE_URL=foobar SECRET_KEY_BASE=foobar mix app.tree
does not reveal any apps depending onmix
at runtimeVerbose Logs
MIX_ENV=prod DATABASE_URL=hogehoge SECRET_KEY_BASE=foobar mix release --verbose
Description of issue
(I am kind of familiar with release handling myself through in-house experiences in access-company/antikythera framework)
My understanding is that distillery should leave
:mix
and:distillery
itself (:artificery
included) behind on building world, not to be included in releases as runtime applications.Looking at
--verbose
logs, those two applications are somehow "discovered." Butcat _build/prod/lib/disttest/ebin/disttest.app
says:So
mix
,distillery
are not traceable fromdisttest
, meaning it is added by distillery for some reasons.Now, I know that
iex
must be included for Elixir-friendly remote console. Althoughiex
itself does not depend onmix
at runtime.My question is two-fold:
mix
anddistillery
runtime applications are added by distillery? If so for what purposes?Thanks in advance! :heart: