mod dep_filter

module dep_filter

EasyBuild’s --filter-deps / EASYBUILD_FILTER_DEPS matching.

A filtered dependency is dropped before the robot walks it, so the dependency and every module reachable only through it are never considered. The rules are EasyConfig.parse_filter_deps, parse_version_range, and dep_is_filtered in easybuild/framework/easyconfig/easyconfig.py, including the name=version and name=[low:high] forms. Version order is easybuild.tools.LooseVersion.

Functions

fn dep_version(dep: &DepReq) -> &str

The version a dependency tuple states.

Parsed dependencies store an exact pin as ==version. EasyBuild compares the version field before that rewrite.

fn specs_from_cli_or_env(cli: &[String]) -> Vec<String>

Specs from the command line, or from EASYBUILD_FILTER_DEPS when the command line did not pass any.

An explicit list wins, including a list that filters nothing only when it is non-empty. The environment variable is comma-separated, matching the value EESSI-extend exports.

Structs and Unions

struct FilterDeps

One parsed --filter-deps list.

The last entry for a name wins, as it does when EasyBuild stores the specs in a dict keyed by dependency name.

Implementations

impl FilterDeps

Functions

fn apply(&self, candidates: &mut [Candidate])

Drop filtered runtime and build dependencies. What remains is what the robot is allowed to walk.

fn dep_is_filtered(&self, name: &str, version: &str) -> bool

Whether a dependency of this name and version is filtered.

version is the version the dependency tuple states, not a solved module version. An empty version is filtered only by a bare name.

fn empty() -> Self

No dependencies are filtered.

fn is_empty(&self) -> bool

Whether the list names nothing.

fn names(&self) -> impl Iterator<Item = &str>

Software names the list filters, in name order.

A name=version or name=[low:high] entry contributes name.

fn parse(specs: &[String]) -> Result<Self, FilterDepsError>

Parse EasyBuild’s filter list.

Each entry is a software name, name=version, or name= followed by a version range. A range uses : between the limits. ` and ` include a limit; ] before the lower limit and [ after the upper limit exclude it. Either limit may be empty.

struct FilterDepsError

Why a --filter-deps entry cannot be applied.

spec: String

The entry that failed.

reason: String

What is wrong with it, in EasyBuild’s wording.

Traits implemented

impl std::fmt::Display for FilterDepsError
impl std::error::Error for FilterDepsError