Ectomancer.Installer.DependencyChecker (Ectomancer v1.2.1)

Copy Markdown View Source

Checks for required and optional dependencies in the project.

Summary

Functions

Check which optional dependencies are present in mix.exs.

Check if all required dependencies are present in mix.exs.

Check if a specific dependency exists in mix.exs.

Generate a friendly error message for missing dependencies.

Functions

check_optional()

@spec check_optional() :: [atom()]

Check which optional dependencies are present in mix.exs.

Returns a list of found optional dependencies.

check_required()

@spec check_required() :: :ok | {:error, [atom()]}

Check if all required dependencies are present in mix.exs.

Returns :ok if all required deps are found, or {:error, [missing_deps]} if any are missing.

dep_exists?(dep)

@spec dep_exists?(atom()) :: boolean()

Check if a specific dependency exists in mix.exs.

Returns true if the dependency is found, false otherwise.

missing_deps_message(missing_deps)

@spec missing_deps_message([atom()]) :: String.t()

Generate a friendly error message for missing dependencies.

Returns a formatted string listing the missing dependencies and how to add them.