# `MixAffected.Graph.Source.XrefDot`
[🔗](https://github.com/mnox/mix_affected/blob/v0.1.0/lib/mix_affected/graph/source/xref_dot.ex#L1)

`MixAffected.Graph.Source` over `mix xref graph --format dot`, the adapter
for Elixir 1.18 (which has no JSON format).

The dot output lists every source file as a node line and every dependency
as an edge line; compile and export edges are labelled, runtime edges are
not:

    digraph "xref graph" {
      "lib/a.ex"
      "lib/a.ex" -> "lib/b.ex"
      "lib/b.ex" -> "lib/a.ex" [label="(compile)"]
      "lib/c.ex" -> "lib/a.ex" [label="(export)"]
    }

Any line outside that shape is a `{:parse_error, line}`.

# `parse`

```elixir
@spec parse(String.t()) ::
  {:ok, MixAffected.Graph.adjacency()} | {:error, MixAffected.Graph.error()}
```

Parses `mix xref graph --format dot` output into adjacency.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
