Working with dependencies in the Hex ecosystem
For the Hex ecosystem (Erlang, Elixir, Gleam), Johnny supports the following package managers:
rebar3 (Erlang)
Using the rebar.config file
Johnny analyzes the main project manifest rebar.config, which contains dependency descriptions.
Using the rebar.lock file
-
Compile the project with dependency download:
-
Lock dependency versions:
A rebar.lock file will be created with locked versions.
Creating a rebar3-tree.txt file
To obtain the full dependency tree, run:
If a rebar3-tree.txt file is present, Johnny uses it directly. When the --rebar-resolve flag is used, Johnny runs rebar3 tree automatically and parses the output in memory.
Dependency resolution via rebar3
Johnny supports dependency resolution for Erlang projects with the --rebar-resolve flag.
mix (Elixir)
Using the mix.exs file
Johnny analyzes the main project manifest mix.exs, which contains dependency descriptions.
Using the mix.lock file
- Get dependencies:
The mix.lock file will be created or updated.
Dependency resolution via mix
Johnny supports dependency resolution for Elixir projects with the --mix-resolve flag.
gleam (Gleam)
Using the gleam.toml file
Johnny analyzes the main project manifest gleam.toml, which contains dependency descriptions.
Using the manifest.toml file
- Download dependencies:
The manifest.toml file in the build/packages directory will be updated.
Dependency resolution via gleam
Johnny supports dependency resolution for Gleam projects with the --gleam-resolve flag.
