View Source HexSolver.Registry behaviour (HexSolver v0.2.0)
The registry is used by the solver to discover package versions and their dependencies.
Link to this section Summary
Callbacks
Returns all dependencies of the given package version or :error
if the package or version
does not exist.
Called when the solver first discovers a set of packages so that the registry can be lazily preloaded.
Returns all versions of the given package sorted from lowest to highest or :error
if the package
does not exist.
Link to this section Callbacks
@callback dependencies(HexSolver.repo(), HexSolver.package(), Version.t()) :: {:ok, [HexSolver.dependency()]} | :error
Returns all dependencies of the given package version or :error
if the package or version
does not exist.
@callback prefetch([{HexSolver.repo(), HexSolver.package()}]) :: :ok
Called when the solver first discovers a set of packages so that the registry can be lazily preloaded.
@callback versions(HexSolver.repo(), HexSolver.package()) :: {:ok, [Version.t()]} | :error
Returns all versions of the given package sorted from lowest to highest or :error
if the package
does not exist.