ETS-backed module dependency graph.
Tracks which files import which specifiers, enabling reverse lookups for HMR propagation — "what depends on this file?"
Summary
Functions
Clear the entire graph.
Create the dependency graph ETS table. Called once from Application.start/2.
Find all files that import the given specifier.
Find all files that import a specifier matching the given predicate.
Get the imports for a file path.
Remove a file from the graph.
Update the imports for a file path.
Functions
@spec clear() :: :ok
Clear the entire graph.
@spec create_table() :: :ok
Create the dependency graph ETS table. Called once from Application.start/2.
Find all files that import the given specifier.
Used by HMR to propagate changes upward through the dependency tree.
Find all files that import a specifier matching the given predicate.
The predicate receives each import specifier and should return true
if it matches the file being searched for.
Get the imports for a file path.
@spec remove(String.t()) :: :ok
Remove a file from the graph.
Update the imports for a file path.