Skip to content

Track exgit main; allow in :dev to unbreak integration tests#1

Closed
ivarvong wants to merge 1 commit into
mainfrom
fix/exgit-app-cycle
Closed

Track exgit main; allow in :dev to unbreak integration tests#1
ivarvong wants to merge 1 commit into
mainfrom
fix/exgit-app-cycle

Conversation

@ivarvong

@ivarvong ivarvong commented May 5, 2026

Copy link
Copy Markdown
Owner

Summary

mix test test/integration/exgit_test.exs --include integration (and
even bare mix run -e 'IO.puts(:hi)' once :exgit was a dev dep)
hung indefinitely with :application_controller looping on
enqueue_or_start_app.

Root cause: a circular OTP application dependency between :vfs and
:exgit. The old exgit.app listed :vfs in its applications key
(Mix auto-includes optional: true deps there). With both apps
loaded in the same VM, the controller deadlocked.

Fix

Two-part:

  1. Upstream (already merged on exgit main, SHA 4a79314): mark
    the :vfs back-dep runtime: false so it stays out of
    applications. The defimpl VFS.Mountable, for: Exgit.Repository
    only needs vfs at compile time anyway — there's no runtime
    supervision tree to depend on.
  2. Here: pin to branch: "main" so the fix flows in, and bump
    from only: :testonly: [:dev, :test] so the integration
    fixture is debuggable from iex -S mix run without
    MIX_ENV=test.

Per CLAUDE.md the invariant is backend → vfs, never the reverse.
That holds: vfs only depends on exgit in :dev/:test (for the
integration test), and exgit only depends on vfs at compile time.

Verification

  • mix check clean: format, compile -W, credo 0 issues, dialyzer 0 errors, 100% coverage, 36 doctests + 46 properties + 325 tests.
  • mix test test/integration/exgit_test.exs --include integration: 9 tests, 0 failures, 30ms.
  • mix run -e 'Application.ensure_all_started(:exgit); IO.puts("ok")' returns immediately.

The integration test set wedged at boot because :exgit's old .app
declared :vfs in its `applications` list (vfs is `optional: true` in
exgit but Mix still emits it). With :exgit also depending on :vfs,
:application_controller deadlocked on enqueue_or_start.

Upstream fix is in exgit main (4a79314): mark the :vfs back-dep
`runtime: false` so it doesn't land in `applications`. Track main here
so the fix flows in, and allow :exgit in :dev so the fixture is
debuggable from `iex -S mix run` without flipping to MIX_ENV=test.

Per CLAUDE.md the dependency direction is backend → vfs; that
invariant is preserved (vfs -> exgit only in :dev/:test, exgit -> vfs
only at compile time).
@ivarvong ivarvong closed this May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant