Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

":with-deps" to manually override the start order / dependencies #48

Open
tolitius opened this issue Feb 2, 2016 · 0 comments
Open

Comments

@tolitius
Copy link
Owner

tolitius commented Feb 2, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant