v0.3.2

Documentation version

v0.2.4v0.3.2
en

Documentation language

en

Search documentation

ESC

Documentation search

What are you working on?

Find a guide, configuration option, action, or ESH topic.

Browse documentation
DocsModule configuration

Module configuration

A module in Evin represents a decoupled subsystem or sub-crate within a workspace. Modules are declared in <module-dir>/.evin/module.flow and discovered by being listed in the root workspace.modules array.

Root schema

module Define module identity, versioning, include paths, environment overrides, and module tasks.

<module-dir>/.evin/module.flow configures a workspace module.

A module is loaded only when its directory is registered in the workspace root's workspace.modules list. Discovered tasks are automatically qualified with <module-name>:<task-id> and default their working directory (cwd) to the module's root directory.

Root Sections

KeyTypeRequiredPurpose
moduleobjectyesModule identity, optional version, and include paths.
tasksmap of tasksnoTasks defined within this module.
envmap of stringsnoEnvironment variables overriding workspace values for module tasks.
valuesmap of stringsnoTemplate values overriding workspace values for module actions.

Module metadata fields

module.name Namespace identifier prepended to all tasks defined in this module.

Specifies the module's namespace identifier.

Behavior

  • Every task declared within this module is automatically prefixed as <module-name>:<task-id> (e.g. api:test).

  • Inter-task dependencies within the same module automatically resolve to the local module task without requiring the prefix (e.g. needs: [compile] resolves to api:compile).

  • Root tasks shadowed by local tasks can be referenced by prefixing with the root workspace name (e.g. needs: [my-repository:compile]).

module.version Independent semantic version string for this module.

Specifies an independent semantic version for the module.

When omitted, the module automatically inherits workspace.version from the root workspace configuration.

module.include External namespace Flow files declaring additional tasks for this module.

Imports namespace Flow documents relative to this module directory. Also accepted with the alias includes.

Prefixing rules

  • If the included namespace name matches the module name, tasks become <module>:<task>.

  • If the included namespace has a distinct name (e.g. routes), tasks are prefixed hierarchically as <module>:<sub-namespace>:<task> (e.g. api:routes:list).

Root sections

module.env Environment variables that override workspace environment for module tasks.

Defines environment variables specific to this module.

Values take precedence over the workspace env block and root .env file, but can still be overridden by task-level env mappings.

module.values Template values that override workspace values for module action configurations.

Declares module-specific action template values accessible via ${value_name} in action with: blocks.

Values take precedence over workspace values, and can be overridden by task-local task.values.

module.tasks Tasks owned by this module that participate in the workspace execution DAG.

Defines tasks owned by this module.

Module tasks use the exact same task schema as the workspace root (run, steps, needs, stage, env, presets, cwd, pure, parallel, watch). By default, commands and actions execute from the module's directory.

Schema

#!evin/v1
module:
  name: api
  include:
    - .evin/routes.flow

env:
  API_LOG: debug

values:
  artifact_name: api-server

tasks:
  test:
    stage: Test
    needs: [compile]
    run: cargo test

  compile:
    stage: Build
    run: cargo build
FieldTypeRequiredMeaning
module.namestringyesNamespace prepended to every module task
module.versionstringnoIndependent module version; inherits workspace.version when omitted
envstring mapnoEnvironment pool overriding workspace values for module tasks
module.includelist or map of pathsnoNamespace Flow files declaring tasks for this module (alias includes)
valuesstring mapnoValues overriding workspace values for module actions
taskstask mapnoSame task schema used by the root workspace

Unknown module and task fields are rejected.

Included namespace files resolve relative to the module directory and default cwd to that directory. See Namespace configuration.

Names and dependencies

The example creates api:test and api:compile. A bare dependency matching a task in the same module is automatically namespaced, so needs: [compile] becomes needs: [api:compile].

A dependency that does not match a local task is left as written and may refer to a root task. To disambiguate a root task shadowed by a local task, prefix it with the root workspace name:

needs: [my-repository:compile]

The workspace prefix is removed during parsing and the dependency resolves to the root compile task.

Execution context

Unless a task supplies cwd, module commands and actions run from the module directory registered in workspace.modules, not from its parent and not from the directory containing .evin/.

Environment and value precedence are:

DataLow → high priority
Action valuesworkspace values → module values → task values
Environment poolroot .env/workspace env → module env

See Environment configuration for how a task selects keys from that pool.

Page source: reference/30.module-configuration.4510.md