Skip to main content

Father of two, software developer, wannabe solarpunk+minimalist.

Non-OTP dependencies in (distillery) release

1 min read

Adding Erlang libraries to your Elixir project and having them included in your (Distillery based) release should work the same way as adding any Elixir library. But sometimes you stumble upon a library that does not implement the OTP application behaviour - thus it can not be added to the applications key - and is not automatically detected by Distillery as a runtime dependency.

Frankly I do not know the exact reason for that but digging through the source and documentation I found a way to solve this problem for my case. You need to specify your library with the :load option in your release configuration (rel/config.exs).

release :myapp do
  set version: "0.1.0"
  set applications: [:app_a, :app_b, some_dep: :load]

This defines some_dep as runtime dependency but not being started (OTP).

Hope this saves you some time. =)

Plug love

1 min read

So I just finished Ch. 5 "Authenticating Users" in the Programming Phoenix book and after coding along the examples of ten pages, on the last page of this chapter I was like "Wait a sec, where do they persist the session data?!" and then I discovered this gem: lets pop corks! now supports modules.