$ 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发布时,通常会遇到向上面这样的问题。
原因是Distillery不会偷偷地将dependencies加入applications中,因为它们是两类东西。例如你在compile时期需要某些dependency,但是不想加入到release中,比如distillery本身就是building中不可缺少的。这导致了一个潜在的问题,dependencies可以定义模块的on_load
回调函数,这会导致运行时不能预期的代码,甚至有可能阻止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,在部署的时候就会遇到这些问题,这时只要根据提示,将
:ex_admin, :exactor, :hound加入到application中去即可。