From ada2eaa35e0d7814fdd1169508550ac694ee82fd Mon Sep 17 00:00:00 2001 From: GenericJam Date: Thu, 27 Aug 2026 12:09:13 -0600 Subject: [PATCH] =?UTF-8?q?docs:=20surface=20the=20Tunnel.setup/2=20?= =?UTF-8?q?=E2=86=92=20setup/1=20break=20in=20the=200.6.7=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by @dl-alexandre in #25. His literal claim — that the arity change isn't in the 0.6.x changelog — is not quite right: it was there, as a parenthetical at the end of a long "Fixed" bullet about dist-port keying. His actual complaint stands though. Tunnel.setup/1 is @doc'd, @spec'd public API that shows up in hexdocs, out-of-tree callers break at compile time, and nobody scanning a changelog for breaking changes reads to the end of a bullet about EPMD port collisions. Pulled it into its own "Breaking" section on 0.6.7 with the exact compile error and the one-line fix, and marked it as noted retroactively so the history stays honest about when it was actually surfaced. No version bump: the changelog for a shipped release is being corrected, not the code. Co-Authored-By: Claude Opus 5 (1M context) --- CHANGELOG.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e87c62b..b4eef05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -441,6 +441,19 @@ this system. ## [0.6.7] - 2026-06-18 +### Breaking +- **`MobDev.Tunnel.setup/2` → `setup/1`.** The dist port is now derived from + the device serial internally, so callers no longer pass an index. `setup/1` + is `@doc`'d public API, so out-of-tree callers (a custom deploy Mix task, + for example) break at compile time with `MobDev.Tunnel.setup/2 is undefined + or private. Did you mean: setup/1`. Fix: drop the second argument — the + returned `%Device{}` carries the assigned `dist_port`. + + *(Noted retroactively. This shipped in 0.6.7 mentioned only as a + parenthetical inside a "Fixed" bullet about dist-port keying, where anyone + scanning for breaking changes would miss it — reported by @dl-alexandre in + GenericJam/mob_dev#25.)* + ### Fixed - **`mix mob.connect` reliability — dist ports keyed by device serial, not run index.** The Mac runs one shared EPMD; assigning ports as `9100 + index` meant @@ -450,8 +463,7 @@ this system. serial (`Tunnel.serial_base_port/1`, a crc32 hash into 9100..9899) and bumped past any port another live node/forward already holds (`assign_dist_port/2`). A given phone always gets the same unique port across runs and projects, and - deploy and connect agree on it. `Tunnel.setup/2` → `setup/1` (port is now - serial-derived, not index-passed). + deploy and connect agree on it. - **Stale-tunnel cleanup.** `Tunnel.setup` removes the device's own old forwards first (scoped to that serial), so prior runs no longer leave duplicate/wrong forwards that poison the next connect.