Skip to content

Commit 758d41f

Browse files
GenericJamclaude
andauthored
Bump to 0.6.33 — one version per app in the shared OTP root (MOB-143) (#60)
The OTP root is keyed by OTP hash rather than by project, so every app on the machine shares one lib/. Installing a dependency without removing its other versions left them side by side, and the code server resolves an application to the highest version it finds there — while the app's own beams come from its lock. An app locking exqlite 0.38.0 loaded 0.38.0's beams and 0.40.0's sqlite3_nif.so, on_load failed with bad_lib, every database connection died and the boot never reached a root screen. The visible error blamed database credentials. Non-local too: an app that built fine yesterday broke because a different app upgraded a dependency. Three of four local projects were already mismatched. pythonx always swept by wildcard and never had this. exqlite, emlx and the generic installer removed only a malformed empty-version dir and let real versions accumulate. All four now sweep, keep the target, and log removals. The first native build after upgrading may report removing stale versions. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 1e754f7 commit 758d41f

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,32 @@ Full module documentation: [hexdocs.pm/mob_dev](https://hexdocs.pm/mob_dev).
1010

1111
## [Unreleased]
1212

13+
## [0.6.33] - 2026-09-04
14+
15+
### Fixed
16+
- **The shared OTP root keeps one version of an app, not every version it has
17+
ever seen** (MOB-143). The root is keyed by OTP hash rather than by project,
18+
so every app on the machine shares one `lib/`. Installing a dependency
19+
without removing its other versions left them side by side, and the code
20+
server resolves an application to the **highest** version it finds there.
21+
22+
That splits an app in half. Its beams come from its own `mix.lock` and are
23+
pushed to the device; `code:lib_dir/1` — and so `code:priv_dir/1`, which is
24+
where `load_nif` looks — resolves against the shared directory. An app
25+
locking exqlite 0.38.0 would load 0.38.0's beams and 0.40.0's
26+
`sqlite3_nif.so`, and `on_load` would fail with `bad_lib`, taking down every
27+
database connection and the boot with it. The visible error talked about
28+
database credentials and said nothing about a cached artifact.
29+
30+
It was also **non-local**: an app that built fine yesterday broke because a
31+
*different* app upgraded a dependency. `pythonx` always swept by wildcard and
32+
never had this; `exqlite`, `emlx` and the generic installer removed only a
33+
malformed empty-version directory and let real versions accumulate.
34+
35+
All four install paths now sweep other versions, keep the target, and log
36+
what they removed. A stale version left by an earlier build is cleaned on the
37+
next native build, so the first build after upgrading may report removals.
38+
1339
## [0.6.32] - 2026-08-31
1440

1541
### Fixed

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule MobDev.MixProject do
44
def project do
55
[
66
app: :mob_dev,
7-
version: "0.6.32",
7+
version: "0.6.33",
88
elixir: "~> 1.19",
99
description: "Development tooling for the Mob mobile framework",
1010
source_url: "https://github.com/genericjam/mob_dev",

0 commit comments

Comments
 (0)