Handle OTP application failures without restarting the Erlang VM
:init
and
:last
options.mix.exs
. Add a :shoehorn
key to the release parameters to set :init
,
:last
or the :exxtra_dependencies
options.This is a major update to Shoehorn that includes breaking changes:
:init
configuration option only supports applications now. MFAs are no
longer supported and moved to runtime.exs
or an Application.start
callback.use Shoehorn.Handler
need to be updated to
@behaviour Shoehorn.Handler
. This may require implementing additional
functions.The main update to Shoehorn is to move all application startup to the boot script. This noticeably improves boot time on many Nerves platforms due to boot scripts being able to load files without traversing the entire Erlang module path list. These traversals are amazingly slow (sometimes seconds) due to a combination of SquashFS slowness in this area and slow overall IO.
Using boot scripts to load all applications has some important improvements in addition to performance:
shoehorn.script
in your
release directory.:extra_dependencies
configuration key) or hinting that dependencies get
started as late as possible (the :last
configuration key):app
configuration key from your Shoehorn configuration.
It's no longer needed.Aside from the change from a macro to a behaviour and possibly needing to
implement callback functions, Shoehorn.Handler
implementations work the same
as before.
Shoehorn v0.8.0 completely removes support for Distillery.
Shoehorn 0.7.0 removes support for creating boot scripts using Distillery and only supports using Elixir releases. As a result, the minimum supported version of Elixir is now version 1.9.