One-shot, machine-readable snapshot of the dala development environment.
Answers "what do I have to work with" — toolchain versions, OTP runtime
caches, connected devices with their node names and dist ports — in one
call. Complements mix dala.doctor (which diagnoses problems); this is
the neutral inventory for scripts, CI logs, and bug reports.
Summary
Functions
Collects the snapshot as a plain (JSON-encodable) map. Never raises —
missing tools become nil entries. Shells out at most once per known
toolchain command.
Collects and JSON-encodes (pretty-printed).
Extracts the adb platform-tools version (e.g. "34.0.5-11300000").
Handles both layouts: Version X on its own line (modern adb) and
... version X on the banner line (older adb). The capital-V pattern runs
first so it never grabs the older 1.x client version from line one.
Extracts the version line from emulator -version output, which prints
INFO banner lines before it. Returns the trimmed line or nil.
Extracts a version from xcrun --version output (e.g. xcrun version 61.).
Functions
@spec collect() :: map()
Collects the snapshot as a plain (JSON-encodable) map. Never raises —
missing tools become nil entries. Shells out at most once per known
toolchain command.
@spec collect_json() :: String.t()
Collects and JSON-encodes (pretty-printed).
Extracts the adb platform-tools version (e.g. "34.0.5-11300000").
Handles both layouts: Version X on its own line (modern adb) and
... version X on the banner line (older adb). The capital-V pattern runs
first so it never grabs the older 1.x client version from line one.
Extracts the version line from emulator -version output, which prints
INFO banner lines before it. Returns the trimmed line or nil.
Extracts a version from xcrun --version output (e.g. xcrun version 61.).