Config-driven runner for Mix-oriented multi-project workspaces.
Workspace configuration lives in the root project's mix.exs under the
:blitz_workspace key. Blitz.MixWorkspace expands the configured project
patterns, builds isolated child mix commands, and runs staged workspace
tasks through Blitz.
Parallelism stays workspace-owned:
baseconfig describes task weightmultiplierdescribes machine size:automultiplier mode scales from local schedulers and memory- per-task overrides and CLI
-jstill take precedence when present
Summary
Functions
Returns a recommended workspace multiplier for the current machine.
Builds environment overrides for a project/task pair.
Builds a stable hashed name for a workspace project path.
Loads and normalizes workspace configuration from the current Mix project.
Returns the effective concurrency for a workspace task.
Returns workspace project paths excluding the root "." entry.
Returns workspace project paths excluding the root "." entry.
Builds the staged execution plan for a workspace task.
Returns workspace project paths in stable configured order.
Returns workspace project paths in stable configured order.
Resolves a CLI task name against the configured workspace tasks.
Returns the normalized workspace root for the current Mix project.
Returns the normalized workspace root from a workspace config.
Runs a configured workspace task for the current Mix project.
Runs a configured workspace task.
Splits runner-level args from child task args.
Builds task args for a configured workspace task.
Types
@type runner_args() :: [String.t()]
@type stage() :: %{ task: task_name(), commands: [Blitz.Command.t()], max_concurrency: pos_integer() }
@type task_name() :: atom()
Functions
@spec autodetect_multiplier(keyword()) :: 1 | 2 | 3 | 4 | 6
Returns a recommended workspace multiplier for the current machine.
Auto mode uses the lower of a CPU-derived class and a memory-derived class so
heavy Mix tasks do not scale only on one axis. Pass :schedulers_online and
:memory_bytes to make detection deterministic in tests or custom tooling.
@spec command_env(workspace_config(), String.t(), task_name()) :: [ {String.t(), String.t() | nil} ]
Builds environment overrides for a project/task pair.
Builds a stable hashed name for a workspace project path.
Loads and normalizes workspace configuration from the current Mix project.
@spec max_concurrency(workspace_config(), task_name(), pos_integer() | nil) :: pos_integer()
Returns the effective concurrency for a workspace task.
@spec package_paths() :: [String.t()]
Returns workspace project paths excluding the root "." entry.
@spec package_paths(workspace_config()) :: [String.t()]
Returns workspace project paths excluding the root "." entry.
@spec plan(workspace_config(), task_name(), [String.t()]) :: [stage()]
Builds the staged execution plan for a workspace task.
@spec project_paths() :: [String.t()]
Returns workspace project paths in stable configured order.
@spec project_paths(workspace_config()) :: [String.t()]
Returns workspace project paths in stable configured order.
@spec resolve_task_name!(workspace_config(), String.t()) :: task_name()
Resolves a CLI task name against the configured workspace tasks.
@spec root_dir() :: String.t()
Returns the normalized workspace root for the current Mix project.
@spec root_dir(workspace_config()) :: String.t()
Returns the normalized workspace root from a workspace config.
Runs a configured workspace task for the current Mix project.
@spec run!(workspace_config(), task_name(), [String.t()]) :: :ok
Runs a configured workspace task.
@spec split_runner_args([String.t()]) :: {runner_args(), keyword()}
Splits runner-level args from child task args.
@spec task_args(workspace_config(), task_name(), [String.t()]) :: [String.t()]
Builds task args for a configured workspace task.