check:deps

Introduction

check:deps checks that each feature’s code only uses the features the UVL model lets it depend on. A constraint A => B lets A use B. Run it after you add an import or a link to another feature.

splent check:deps
  dashboard  (not in cache, skipped)
  [✔] notes — no cross-feature dependencies
  [✔] reports imports notes  (allowed: reports => notes)
  [✖] digest references (template) reports  UNDECLARED — no UVL constraint between digest and reports

  1 violation(s) found. Fix the code or update the UVL.

Any violation exits 1. With none it ends with ✅ All cross-feature imports are consistent with UVL (<n> checks passed).


What counts as a use

Where What counts
.py files from splent_io.splent_feature_<x> ... or import splent_io.splent_feature_<x>
.html templates url_for('<x>.endpoint', ...), where <x> is another feature’s short name

It scans each feature of the model that your product has under features/. A feature’s tests/ folders are left out, since a test may use another feature to build its scenario.


Fixing a violation

Verdict Meaning What to do
UNDECLARED No UVL constraint between the two Add A => B with spl:add-constraints, or remove the use
INVERTED The model says the opposite, B => A Move the code to the feature that may depend on the other

An import under a try that tolerates ImportError, or under an if that asks whether the product has the feature, is no dependency, the same reading feature:release gives it in the contract. Any other use that only works when the other feature is there, such as a has_endpoint check, needs no constraint either. List that feature in the contract’s requires.features_optional and the use passes as (optional: ...).


Reference

The model is the product’s SPL ([tool.splent].spl), from its working copy or the cache, fetched when it is pinned and not on disk. A product with no SPL can point at a file under its uvl/ folder with [tool.splent.uvl].file.

A feature of the model that is not in features/ shows as (not in cache, skipped), and one with no src/ as (no src/, skipped).

It needs a selected product (SPLENT_APP).

See check:contracts to compare the contracts with the model, and feature:order for the install order the dependencies give.


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es