In case of indirect dependencies sometimes it is needed to specify a particular order in which they start.
For example if we have a message bus and a subscriber that are indirectly connected via, say, a core.async channel, we need to make sure the subscriber does not start subscribing to the message bus before the bus is started.
It is not a simple task to validate the dependency order just for indirect dependencies:
i.e. in case a state a is "enriched" with a dependency on state b, how do we know that by starting b a bit earlier, to satisfy this dependency, we not hurting it (b) by now not yet starting states that b naturally depends on
since mount records only a linear dependency / start order.
Therefore the idea (that belongs to @wkf) is to optionally specify all the dependencies on mount start e.g.:
(mount/start-with {:with-deps {... dependency graph / order ...}})
This has to do with start-with rebranding #47, and, as a side effect, will add more dependency graph explicitness.
In case of indirect dependencies sometimes it is needed to specify a particular order in which they start.
For example if we have a message bus and a subscriber that are indirectly connected via, say, a core.async channel, we need to make sure the subscriber does not start subscribing to the message bus before the bus is started.
It is not a simple task to validate the dependency order just for indirect dependencies:
since mount records only a linear dependency / start order.
Therefore the idea (that belongs to @wkf) is to optionally specify all the dependencies on mount start e.g.:
This has to do with
start-with
rebranding #47, and, as a side effect, will add more dependency graph explicitness.