aroemers / mount-lite

mount, but different and light
https://cljdoc.org/d/functionalbytes/mount-lite/
Eclipse Public License 1.0
102 stars 8 forks source link

Include var neighbors in with-transitives* #16

Closed dryewo closed 6 years ago

dryewo commented 6 years ago

The problem was with defstates defined in the same namespace:

(m/defstate s1 :start {})
(m/defstate s2 :start {})

(require '[mount.extensions.namespace-deps :as mnd])

;; Won't start s1
(mnd/start #'s2)

This PR hopefully (works for me) fixes it. However, I didn't have "stop-down-to" case in mind, so please double check it :)

aroemers commented 6 years ago

Hi @dryewo,

Thank you for your PR. I appreciate your work, however, adding the neighbours is not the responsibility of the with-transitives* function. The graph input should already contain the correct dependencies and dependents. As you can see in 170e677, I have added this "neighbours" functionality in the namespace-deps/build-graphs function and released this as the latest "2.1.0-SNAPSHOT".

I think this PR can be closed, but I leave that up to you.

dryewo commented 6 years ago

Hi @aroemers, No worries, I'm glad you have the solution already :)