Commit a0d9aa4
committed
Recursive needs processing
The current way needs relations are checked in void App::_process_requirements()
is missleading.
Assume you have an application 'test' with a CLI11 config system configuring
following needs relations between some subcommands:
app ---> sub1 ---> sub11
| |-> sub12
|-> sub2
A) Current needs processing gives:
./test -> test requires sub1 // OK for the user
./test sub1 -> test requires sub2 // OK for the user
./test sub1 sub2 -> sub1 requires sub11 // Confuses the user
./test sub1 sub2 sub11 -> ready for execution
B) Recursive needs processing gives:
./test -> test requires sub1 // OK
./test sub1 -> sub1 requires sub11 // Much more intuitive for the user
./test sub1 sub2 -> sub1 requires sub11 // Makes sense: sub1 configuration is not compleate yet
./test sub1 sub11 -> test requires sub2 // OK, sub1 configuration is compleate
./test sub1 sub11 sub2 -> ready for execution1 parent 5248d5b commit a0d9aa4
1 file changed
+16
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1317 | 1317 | | |
1318 | 1318 | | |
1319 | 1319 | | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
1320 | 1325 | | |
1321 | | - | |
1322 | | - | |
1323 | | - | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
1324 | 1336 | | |
1325 | 1337 | | |
1326 | 1338 | | |
| |||
1402 | 1414 | | |
1403 | 1415 | | |
1404 | 1416 | | |
1405 | | - | |
| 1417 | + | |
1406 | 1418 | | |
1407 | 1419 | | |
1408 | 1420 | | |
| |||
0 commit comments