1. An ecosystem
Libraries rarely live alone: a portability layer feeds a string library, which feeds a parser, which feeds your application, each in its own repository with its own tags and CI. When one changes, the others must follow, in the right order. fobis ecosystem treats such a family of FoBiS projects as a whole.
This track uses a small family that the documentation can build for you, three projects with history, tags, fetched dependencies and git remotes, all private to one directory:
bash docs/demo/ecosystem-demo/setup.sh ~/eco # the script is in the FoBiS repository
source ~/eco/env.sh # its registry, and its github.com/demo URLs resolved locally
cd ~/eco$ ls
app
core
env.sh
mathx
remotescore is a small library; mathx uses it; app uses both. Each declares its dependencies the usual way, in its fobos (fobis fetch cloned them into third_party/):
$ cat app/fobos | sed -n "/dependencies/,/^$/p"
[dependencies]
deps_dir = third_party
mathx = https://github.com/demo/mathx
core = https://github.com/demo/coreRegistering the projects
The ecosystem is a list of projects in your user configuration (~/.config/fobis/config.ini, here the demo's): root, the directory that holds them, and projects. discover lists the FoBiS projects under the root not registered yet; add registers them:
$ fobis ecosystem discover
Unregistered FoBiS projects under ~/eco:
app
core
mathx
Register the ones you want to manage (not necessarily all):
fobis ecosystem add app core mathx$ fobis ecosystem add core mathx app
Registered core, mathx, app in ~/eco/.config/fobis/config.ini
See where they sit: fobis ecosystem graphThe graph
FoBiS reads every project's [dependencies] and orders them: a project comes after everything it uses.
$ fobis ecosystem graph
Release order (dependencies first)
1. core (level 0)
2. mathx (level 1)
3. app (level 2)
Dependency tree
app
|-- mathx
| `-- core
`-- coreThe release order is the order in which every command of the next chapters acts. A cycle between projects is reported (dependency cycle, not ordered: ...) and its projects come after all the others.
What you learned
The registry ([ecosystem] root and projects), discover, add, graph. Reference: ecosystem.
Next: 2. The dashboard.