Fork me on GitHub
#integrant
<
2024-04-30
>
akiel14:04:24

Hi @weavejester thanks for integrant, I use it in a quite sizeable project. Only that I have to change about 50 pre-init-spec methods now migrating to v0.9.0. Quite sad that spec is still alpha and the community at least doesn't fully embrace it nowadays.

weavejester17:04:44

You're welcome. The shift to assert-key was to enable support other validation systems, while removing the dependency on Clojure spec. You could write your own pre-init-spec method and then use clojure.spec/assert:

(defmethod ig/assert-key :default [k v]
  (s/assert (pre-init-spec k) v))

weavejester17:04:23

I was in two minds about whether to remove the dependency or add a temporary deprecated. I think in retrospect it would have been better to add a deprecation and remove it in 0.10.0.

akiel12:05:47

Thanks, I did exactly what you sugested. I backported the pre-init-spec multi-method.