mix_workspace

Native Mix project seed.

Description#

mix_workspace evaluates mix.exs for development, test, and production, then emits ordinary mix_dependencies, mix_project, elixir_test, and mix_release targets. The native manifest and lockfile stay authoritative.

For a leaf project, the seed's build capability selects the development application. For an umbrella root, it selects the detected child mix_workspace seeds. Nested projects and path dependencies preserve their workspace-relative layout.

Projects with external dependencies must already have a current mix.lock and materialized dependency sources. Resolution runs with isolated Mix and Hex homes and Hex offline mode.

Materialize the exact locked sources before previewing or loading the graph:

bash
mix deps.get --check-locked

Use mix deps.get without --check-locked only when intentionally creating or updating the lockfile.

Attributes#

AttributeTypeRequiredDefaultDescription
manifeststringnomix.exsPackage-relative Mix project manifest
lockfilestringnomix.lockPackage-relative authoritative lockfile
resolver_inputslist<string>nosrcsText inputs available while deriving the graph

Dependency Edges#

EdgeAcceptsDescription
depsmix_project, mix_workspaceDefault development application or nested workspace selected by the resolver

Providers#

The target emits mix_workspace.

Capabilities#

CapabilityOutput groups
buildnone

Direct Use#

Discover and preview the native project:

bash
once query native-projects
once query native-project mix

Initialize the seed:

bash
once edit init-native-project mix

The imported target is equivalent to:

toml
[[target]]
name = "mix"
kind = "mix_workspace"
srcs = ["mix.exs"]
[target.attrs]
resolver_inputs = ["mix.exs", "mix.lock", ".formatter.exs", "config/**/*.exs"]

Sources#