spl:remove-feature
Table of contents
- Introduction
- When something still needs the feature
- Removing it anyway
- Removing a feature with children
- How it edits the model
- Reference
- Requirements
- See also
Introduction
spl:remove-feature takes a feature out of your product line’s model, together with every constraint that names it. It is the counterpart of spl:add-feature.
splent spl:remove-feature my_spl followers
Removed 'followers' from my_spl.
dropped constraint: followers => mailer
It asks nothing. Name the feature as in the model or by its package.
When something still needs the feature
$ splent spl:remove-feature my_spl mailer
mailer cannot be removed: digest, followers depend on it.
Remove those first, or pass --force to drop their constraints along with it.
It refuses while another constraint needs the feature, a compound one such as digest => mailer & notes included. The feature’s own requirements, such as followers => mailer, never block it. They go with it.
Removing it anyway
splent spl:remove-feature my_spl mailer --force
--force also drops the constraints that need it.
Removing a feature with children
shop cannot be removed: it has child features (collections).
Removing only its line would hang the children from the sibling above, so this is refused even with --force.
How it edits the model
A group, or a constraints section, left empty goes too, since UVL rejects both. The edit goes to the working copy, never to the cache, as with spl:add-feature.
The previous model is kept as my_spl.uvl.bak, and restored if the new one does not parse.
Reference
Arguments and options
| Argument / Option | Description |
|---|---|
<spl_name> |
The product line to change |
<feature> |
The name in the model or the package |
--force |
Remove it even when other constraints need it, dropping them. Not for a feature with children |
Errors
Each one exits 1 and changes nothing.
| Message | What to do |
|---|---|
<feature> is not declared in <spl>. |
Use a name from the Known: line it prints |
<feature> cannot be removed: <a>, <b> depend on it. |
Remove those first, or pass --force |
<feature> cannot be removed: it is named in this constraint. |
Same. With dependents too, it reads is also named in |
<feature> cannot be removed: it has child features (...). |
Remove the children first |
UVL did not validate after editing ... |
Edit the model by hand |
Requirements
- Detached mode, with no product selected. A leading
SPLENT_APP=runs one command detached and keeps your selection.
See also
spl:depswith--reverseshows what needs a feature before you remove it.spl:featureslists the features of the model.