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

Restarting depending state on state's namespace reloading #88

Closed
edvorg opened this issue Aug 16, 2017 · 2 comments
Closed

Restarting depending state on state's namespace reloading #88

edvorg opened this issue Aug 16, 2017 · 2 comments

Comments

@edvorg
Copy link
Contributor

edvorg commented Aug 16, 2017

Hi. Couldn't find anything in readme about such feature. The idea is that I have some state (com.a/A) that is calculated somehow based on value of other state (com.b/B). Is it possible to restart com.a/A when I reload namespace com.b that is holding state B?

@tolitius
Copy link
Owner

it could be related to #48 where you would be able to provide dependencies manually.

since mount does not build a dependency graph, it would only see states that belong to a namespace that is being reloaded. i.e. it would restart all the states in #'com.b, but would not know to restart states in #'com.a.

you can of course do:

(mount/stop #'com.b/B #'com.a/A)
(mount/start #'com.a/A #'com.b/B)

but this is not what you're looking for.

I believe mount-lite does build a real graph, you could definitely ask @aroemers he is very good at responding.

Introducing a real dependency graph has benefits and disadvantages. For example one of the benefits would be to start all the states "up-to" #'app/foo (that mount-lite does). Or restart all the transitive dependencies of the namespace that is being reloaded. However it adds a lot of complexity and uncertainties into mount internals, which I'd like to avoid.

@edvorg
Copy link
Contributor Author

edvorg commented Aug 17, 2017 via email

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

2 participants