integrant

lambder 2018-04-04T08:43:34.000294Z

how should I do something like this correctly:

(def config 
  {
   :a {}
   
   :b {:x (:x (ig/ref :a))
       :y (:y (ig/ref :a))}})
? e.g. how to use ig/ref in nested form?

val_waeselynck 2018-04-04T12:29:56.000509Z

@lambder what do you expect, and what do you get?

lambder 2018-04-04T12:34:42.000324Z

(:x (ig/ref :a) result in nil (as expected but not desired) I'd like to have the value associated with :x from the the map produced by ig/init :a multimethod call.

2018-04-04T13:30:57.000360Z

You’d need to have intermediate keys that pull the :x and :y values out of :a. Or do so in :b’s ig/init-key method.

lambder 2018-04-04T15:56:18.000134Z

I can't do it on :b's method as it can technically not be in my control. By intermediate keys, so you mean, two separate dedicated ig/init-key methods for them?

lambder 2018-04-04T17:39:37.000450Z

@weavejester ^

2018-04-04T17:41:22.000354Z

Yes. Create new keys to split up :a.