mob.adopt: relocate the Igniter installer from mob_new#8 into mob_dev#19
Merged
Conversation
`mix mob.adopt` installs Mob into an existing Phoenix project — the Igniter-based install-into-existing counterpart to `mix mob.new`. It was contributed against mob_new as mob_new#8 by @ken-kost, but it's an Igniter task that mutates an existing project (exactly like mob_dev's `mob.add_nif` / `mob.enable`). mob_new ships as a self-contained Mix archive that can't carry Igniter (ArchiveSelfContainedTest), so adopt belongs in mob_dev, a regular Hex dep where Igniter is already on the path. Relocates the whole task tree (`Mix.Tasks.Mob.Adopt[.{Deps,Bridge,Screen, MobApp,MobExs,Native[.Android,.Ios],Finalize}]` — task names unchanged) and `MobNew.AdoptGuard` → `MobDev.AdoptGuard`. The shared patcher/generator helpers adopt calls are duplicated from mob_new's LiveViewPatcher / ProjectGenerator into `MobDev.Adopt.Patcher` / `MobDev.Adopt.Generator` (only the transitive closure adopt exercises); mob_new keeps its own copies for `mix mob.new`. Phase 5 of build_system_migration.md reunifies them via Igniter. Native Android/iOS trees still render from mob_new's priv/templates/mob.new/, resolved via a :mob_new dep / $MOB_NEW_DIR / ~/code/mob_new. Preserves the runtime `Regex.compile!/1` form (rule #9). Ports the full test suite (adopt sub-task tests, AdoptGuard test, and the @tag :acceptance E2E adapted to wire mob_dev in as a path: dep + igniter). Docs: CHANGELOG Unreleased entry, README task table, AGENTS/CLAUDE key files, and decisions/2026-06-19-mob-adopt-lives-in-mob_dev.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ed contract mix mob.adopt --android/--ios resolves mob_new's bundled priv via :code.priv_dir(:mob_new) (same as mix mob.new) from the installed archive, not a :mob_new dep. Document the dual requirement (mob_new archive + mob_dev dep) in the task moduledoc, generator moduledoc, error message, CHANGELOG, and ADR; mob_new stays the single source of native templates. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mob.adopt --android/--ios renders from mob_new's templates (single source, not duplicated). CI now checks out GenericJam/mob_new and sets MOB_NEW_DIR so the native sub-task tests run against real templates instead of raising. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relocates
mix mob.adopt— contributed as GenericJam/mob_new#8 by @ken-kost — from mob_new into mob_dev, where the Igniter-based Mix tasks live (mob.add_nif,mob.enable).Why move it
mob.adoptis an Igniter task that mutates an existing project. mob_new ships as a self-contained Mix archive (ArchiveSelfContainedTestpins that no hex-dep modules are archive-reachable), so it can't carry Igniter —mix mob.adoptfrom the archive would crash every user withUndefinedFunctionError. mob_dev is a normal Hex dep of the user's project, so Igniter is already on the path. Seedecisions/2026-06-19-mob-adopt-lives-in-mob_dev.md.What's here
mob.adopt+deps/bridge/screen/mob_app/mob_exs/native[/android,/ios]/finalize), task names unchanged.MobNew.AdoptGuard→MobDev.AdoptGuard; shared patcher/generator helpers duplicated intoMobDev.Adopt.{Patcher,Generator}(only the closure adopt exercises; mob_new keeps its copies formob.new).~r//→Regex.compile!(rule BLE: Keep hybrid direct-MX + MB test scaffolding as a low-cost re-validation path for future iOS releases #9), standaloneAdoptGuardguards on LV sub-installers, orchestrator/Finalize/--pythontests, acceptance-test exclusion, dead-accessor cleanup.Runtime contract
Native trees (
--android/--ios) render from mob_new's templates, resolved via:code.priv_dir(:mob_new)— so they require the mob_new archive installed (mix archive.install hex mob_new) alongside mob_dev as a dep. mob_new stays the single source of native templates (no duplication/drift). Elixir-side adoption needs no archive.Closes the architectural side of mob_new#8 (that PR is closed unmerged; the work lands here).
🤖 Generated with Claude Code