feature:compat
Introduction
feature:compat compares the contracts of two features and tells you what would clash if a product had both. Run it before you add a feature next to another one. To check every feature of a product at once, use product:validate.
splent feature:compat splent_feature_notes splent_feature_auth
Compatibility — splent_feature_notes vs splent_feature_auth
──────────────────────────────────────────────────────────────────────
splent_feature_notes: Notes with title and body owned by the authenticated user
splent_feature_auth: Accounts, login, logout, sessions and one password policy for every form that sets a password
ℹ️ INFO [hooks]
Hook slot 'layout.authenticated_sidebar' has callbacks in both — both will run.
Features: splent_feature_notes, splent_feature_auth
ℹ️ INFO [requires]
splent_feature_notes declares a dependency on splent_feature_auth.
──────────────────────────────────────────────────────────────────────
2 info
Name each feature by its package name, splent_feature_notes, not by its short name.
With nothing to report, it prints ✅ Compatible.
Showing only what blocks you
splent feature:compat splent_feature_notes splent_feature_auth --min-severity error
--min-severity hides the findings below a level, error, warning or info (the default).
Reading the result in a script
splent feature:compat splent_feature_notes splent_feature_auth --json
--json prints the findings as a JSON array, each with severity, field, values, features and message. --min-severity filters it too. The command exits 0 whatever it finds.
Reference
Arguments and options
| Argument or option | Description |
|---|---|
FEATURE_REF_A, FEATURE_REF_B |
A package name, optionally as namespace/name or name@version. Read from the workspace root first, then from .splent_cache/features/<namespace>/, the version given or else the first cached one by name |
--min-severity |
error, warning or info. Hides what is below |
--json |
Print the findings as JSON |
Findings
| Severity | Finding |
|---|---|
| error | The same route, or the same blueprint name, in both |
| warning | The same model class, or the same service class, in both |
| info | A hook slot both fill (both callbacks run), an environment variable both require, or one declaring a dependency on the other |
A feature it cannot find stops it with Not found: <name> and exit code 1.
Requirements
- A selected product (
SPLENT_APP).
See also
product:validatechecks every feature of a product.feature:xrayshows refinements and hook usage.