integrant

papachan 2024-05-02T13:48:26.154779Z

Hi i just noticed that prep and prep-key are now obsoletes with 0.9.0 but looking at the new release-log i don't see any info how i can proceed to pre-parse a config before sending it to init Is that this expand-key method now? Thanks !

weavejester 2024-05-02T13:50:26.700279Z

Yes, that's right. So:

(defmethod ig/prep-key ::example [_ v]
  (assoc v :port 3000))
Would be equivalent to:
(defmethod ig/expand-key ::example [_ v]
  {::example (assoc v :port 3000)})

weavejester 2024-05-02T13:51:41.539509Z

Since the expand-key method can do everything that prep-key can, but also edit other keys as well, prep-key is deprecated. I'll add this example to the README to make it clearer.

👍 1
papachan 2024-05-02T13:52:38.994779Z

Oh thank you for your explanation ! really appreciate !