Closed james-doolan closed 8 months ago
expand replaces Refs/Refsets with maps, resulting in an un-initialisable config.
expand
(ns test (:require [integrant.core :as ig])) (defmethod ig/init-key ::A [_ c] c) (defmethod ig/init-key ::B [_ c] c) (def config {::A {:b1 (ig/ref ::B) :b2 (ig/refset ::B)} ::B {}}) ;; Expect the following to produce equivalent results: (-> config ig/expand ig/init) => #:test{:A {:b1 {:key :test/B}, :b2 {:key :test/B}}, :B {}} (-> config ig/init) => #:test{:B {}, :A {:b1 {}, :b2 #{{}}}}
Thanks for the report, and thanks for testing out the alpha to find this. I'll push a fix hopefully later today.
expand
replaces Refs/Refsets with maps, resulting in an un-initialisable config.