fix: pre-compile test deps in shellHook so mix test always works

Add MIX_ENV=test mix deps.compile after NIF build. The _build/test
tree is ephemeral (cleared when nix devShell derivation changes), which
causes 'Mox is not available' errors. This ensures test deps like Mox
are ready before the user ever runs mix test.
This commit is contained in:
Graham McInitre 2026-07-16 09:33:55 -05:00
parent b038094dc4
commit 07a772a7f9

View file

@ -332,6 +332,10 @@ mkShell {
make -C c_src
fi
# Pre-compile test dependencies so mix test works immediately.
# The _build/test tree is ephemeral (cleared when nix devShell changes).
MIX_ENV=test mix deps.compile 2>/dev/null || true
# Auto-start services on first shell entry.
# Run in a detached subshell to prevent nix develop from waiting
# on daemonized PostgreSQL/Redis child processes.