What the two places the client runs answer differently: a Mix project at
build time (Precompiled.Env.MixProject) and the project
Mix.install/2 keeps on a device (Precompiled.Env.MixInstall).
Everything else in the client is shared.
Summary
Types
How Mix builds a dependency in this project: the manager it resolved
("mix", "rebar3", "make", or nil when unknown) and the options
among :manager, :compile and :system_env its declaration sets.
Every Hex dependency's build_method/0, or {:unknown, why} when Mix
could not load the dependencies, in which case no build matches.
The order mix deps.compile compiles this project's dependencies in, and
what each one finds loaded when it compiles, or {:ambiguous, why, deps} when
there is no single order (a partitioned compile). Read only by this
library.
Where Mix loads each dependency of this project from: for a Hex
dependency (Hex.SCM, no :path or :git option), the lock entry Mix
loaded it with, when that is a Hex entry of the package it names;
otherwise :path, :git or :other. A dependency changed to path: or
git: with override: true keeps its old Hex entry in mix.lock, so
the lock alone cannot tell. Read only by this library.
Per dependency, its children as Mix loads them for the current env and
target: an optional dependency nothing in this env brings in is not
there, even when mix.lock has it (e.g. a project's only: :test
dependency in dev). Read only by this library.
Functions
The transitive deps of app in tree (a present_deps/0), sorted,
without app itself: what Mix has loaded when it compiles app in the
current env. nil when the tree is unknown or does not have app.
The locked Hex entries among apps, in the order given. envs names each
app's own compile env (Mix compiles a dep as :prod unless the project
overrides it, e.g. {:foo, "~> 1.0", env: :dev}); an app missing from it
gets "prod".
The options among :manager, :compile and :system_env that a
dependency's declaration sets, in that order; an empty list or map
sets nothing. Each makes Mix build the
dependency another way than the portal did, so no build matches it.
Types
How Mix builds a dependency in this project: the manager it resolved
("mix", "rebar3", "make", or nil when unknown) and the options
among :manager, :compile and :system_env its declaration sets.
@type build_methods() :: %{optional(atom()) => build_method()} | {:unknown, String.t()}
Every Hex dependency's build_method/0, or {:unknown, why} when Mix
could not load the dependencies, in which case no build matches.
The order mix deps.compile compiles this project's dependencies in, and
what each one finds loaded when it compiles, or {:ambiguous, why, deps} when
there is no single order (a partitioned compile). Read only by this
library.
Where Mix loads each dependency of this project from: for a Hex
dependency (Hex.SCM, no :path or :git option), the lock entry Mix
loaded it with, when that is a Hex entry of the package it names;
otherwise :path, :git or :other. A dependency changed to path: or
git: with override: true keeps its old Hex entry in mix.lock, so
the lock alone cannot tell. Read only by this library.
Per dependency, its children as Mix loads them for the current env and
target: an optional dependency nothing in this env brings in is not
there, even when mix.lock has it (e.g. a project's only: :test
dependency in dev). Read only by this library.
@type t() :: %Precompiled.Env{ build_lib: Path.t(), build_methods: build_methods(), candidates: [candidate()], compile_order: compile_order() | nil, compiled_ok: MapSet.t(atom()) | nil, config_unreadable: String.t() | nil, dep_envs: %{optional(atom()) => String.t()}, dep_sources: dep_sources() | nil, deps_path: Path.t(), inert_deps: %{optional(atom()) => [Path.t()]} | nil, installed: [atom()], installed_envs: %{optional(atom()) => String.t()}, lock: map(), mix_target: String.t(), non_hex_deps: [atom()] | nil, present_deps: present_deps() | nil, probe: map() | nil, relocate: term(), system: {String.t(), String.t()} | nil, tooling: [atom()] | nil, umbrella_apps: [atom()] | nil }
Functions
@spec closure(present_deps() | nil, atom()) :: [atom()] | nil
The transitive deps of app in tree (a present_deps/0), sorted,
without app itself: what Mix has loaded when it compiles app in the
current env. nil when the tree is unknown or does not have app.
The locked Hex entries among apps, in the order given. envs names each
app's own compile env (Mix compiles a dep as :prod unless the project
overrides it, e.g. {:foo, "~> 1.0", env: :dev}); an app missing from it
gets "prod".
The options among :manager, :compile and :system_env that a
dependency's declaration sets, in that order; an empty list or map
sets nothing. Each makes Mix build the
dependency another way than the portal did, so no build matches it.