PhoenixAssets. Plugin. Resolver
(PhoenixAssets v0.1.0)
View Source
Resolves a list of plugins into a deterministic execution order.
Given {module, opts} pairs in declaration order, the resolver reads each
plugin's depends_on (hard) and after_plugin (soft) edges and produces a
topological ordering via Kahn's algorithm. Ties (several plugins ready at once)
break by declaration order, so the result is stable. A hard dependency that is
absent fails with {:missing_dependency, plugin, dependency}; a cycle fails
with {:cycle, modules}.
See also
PhoenixAssets.Preset-- runs this at compile time so cycles surface as compile errors.
Summary
Functions
Renders a resolver error as a human-readable string.
Resolves plugins into topological order.
Types
Functions
Renders a resolver error as a human-readable string.
Resolves plugins into topological order.
Returns {:ok, ordered_plugins} preserving each plugin's opts, or
{:error, reason}.