← All decisions

Install Erlang/OTP via asdf (build from source), not the RabbitMQ PPA

erlangotpasdfwsl2

Context

Gleam 1.18.1 emits Erlang `-moduledoc(~"...")` doc-attribute syntax requiring OTP 27+. Ubuntu 24.04's apt-packaged Erlang is OTP 25 and fails to compile any Gleam-generated Erlang output.

Options considered

RabbitMQ team's Erlang APT repository/PPA — rejected
Requires adding a third-party APT repository and trusting a new signing key system-wide -- a harder-to-reverse, higher-blast-radius change than the alternative, for a need that's local to this one project.
asdf version manager (official Gleam-documented method) — chosen
Self-contained under the user's home directory, fully reversible, and it's the method Gleam's own installation docs document for this exact OTP-version problem. Trade-off: builds Erlang from source, which is slow.

Decision

Installed asdf, then Erlang/OTP 29.0.5 and rebar3 3.27.0 through it, pinned via a global .tool-versions file.

Verification

gleam test passed cleanly on the erlang target after the switch, where it had failed to even compile beforehand.

Consequences

Erlang/rebar versions for this project are now reproducible via `asdf install` on any machine with this repo. The apt-installed OTP 25 was left in place unused (not purged) since removing system packages wasn't necessary to fix the problem.

References