$ mix release --warnings-as-errors --env=prod (/root/yii)
==> Assembling release..
==> Building release yii:0.0.1483409080 using environment prod
==> One or more direct or transitive dependencies are missing from
:applications or :included_applications, they will not be included
in the release:
使用Distillery發(fā)布時,通常會遇到向上面這樣的問題软瞎。
原因是Distillery不會偷偷地將dependencies加入applications中,因為它們是兩類東西拉讯。例如你在compile時期需要某些dependency涤浇,但是不想加入到release中,比如distillery本身就是building中不可缺少的魔慷。這導致了一個潛在的問題只锭,dependencies可以定義模塊的on_load
回調函數(shù),這會導致運行時不能預期的代碼院尔,甚至有可能阻止release的啟動蜻展。
The warning you see in the output is intended to let you know when one is missing. I went back and forth on this, but after a conversation with a number of people on IRC, I realized that there are a couple of situations where doing that is not desired, and having an opt-out mechanism is just as much pain as an opt-in mechanism, except we already have the opt-in mechanism, and one that many people are used to at this point.
比如使用ex_admin,在部署的時候就會遇到這些問題邀摆,這時只要根據(jù)提示纵顾,將
:ex_admin, :exactor, :hound加入到application中去即可。