DidactMacros

DidactMacros

Multiple errors when trying to do a basic release with Distillery. Is it OTP 26 compatible?

I’ve been working through Programming Elixir, the second half of Chapter 20 pertains to releases and hotcode reloading.

One of the first errors I experienced was when using mix release --env=prod

Mix could not invoke task “release” : 1 error found
–env :unknown option

When I found that the new mix format to be used for distillery was distillery., I started again (after cleaning) using distillery.init, then distillery.release --env=prod.

Everything was beginning to build then I got a Release Failed error regarding not finding a file at ./config/config.exs, which is a bit odd because it’s my first time using distillery so I’m taking the out of the box approach, and copying files directly into config is not recommended by the distillery guides.

Throwing more at the problem I updated my dep description of distillery to include github: "bitwalker/distillery", in case github was ahead of the pm.

deps do
  [
    {:distillery, "~> 2.1", runtime: false,  github: "bitwalker/distillery"}
  ]
end

runtime: false was removed, but I understand it is ignored anyway.

After I relented and touched config/config.exs I got to the packaging stage of distillery.release before triggering a Failed to archive release error that no such file or directory was located at the target uri (stipulated in the error log).

Does distillery work on the latest OTP?

I’ve been looking around and haven’t found much info regarding these bugs other than that there was a breaking change in erlang/otp 25. I’m using Erlang/OTP 26. I’ve not seen notice of a rectification.

I downloaded OTP 24 but I am reluctant to switch to it for the sake of completing this example.

Moved to chapter 21 for the time being so this isn’t necessarily urgent, just a request for clarification.

Much appreciated.

Marked As Solved

andyleclair

andyleclair

The architecture for hot reloads exists at the erlang level (in the form of AppUps) but it is rarely used in prod (at least in my experience, I’m sure Ericsson would beg to differ) because there are a few annoying caveats.

We used to use them at Appcues, but it ended up being more of a pain than it was worth, so now we just reboot the processes. This gives us a few other useful properties (clearing ETS caches, not needing to coordinate running process version upgrades) and is easier for us to reason about.

To directly answer your question, distillery doesn’t currently support OTP 25 (see also; THIS LIBRARY IS NOT COMPATIBLE WITH ERLANG/OTP 25 · Issue #744 · bitwalker/distillery · GitHub) but there is a fix on a fork, YMMV.

Also Liked

D4no0

D4no0

Distillery was used back in the day, I am not sure it is still actively supported.

The official way to make releases now is to use releases. You can do that from any elixir project by running release task:

mix release 
Hermanverschooten

Hermanverschooten

Currently releases do not support hot code upgrades.

D4no0

D4no0

Imagine you are talking on the phone and your call stops because someone did a new deploy :smile: . In their case that feature was crucial and maybe once we can create a good abstraction over it, we will harness the full power without these nitty-gritty details.

Last Post!

D4no0

D4no0

Damn, that is a lot of computing power.

In this case, I agree that having hot-code reload is pretty neat. I think that once I will have some time to spare, I will start exploring this, as I think it might be a great feature if ironed out properly.

Where Next?

Trending in Questions Top

lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
tj0
I’ve been following the steps here for the upgrade from 1.6 to 1.7 and it has gone relatively smoothly all the way till the phoenix_view ...
New
cgraham
Hi! What is currently the best library/method for parsing text and tabular data out of PDF files in Elixir or Erlang?
New
stefanchrobot
Hi, I need a way to handle data migrations in my application. I found an article by @wojtekmach about manual migrations: Automatic and ma...
New
stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
webofbits
Squid Mesh is an open source workflow automation runtime for Elixir applications. It is aimed at Phoenix and OTP apps that want to defin...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
kip
In 2021 I started a new library called Tempo with the objective of modelling time as a set of intervals - not as instants. In 2022 I gave...
New

We're in Beta

About us Mission Statement