This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-06
Channels
- # announcements (3)
- # asami (41)
- # aws (2)
- # babashka (65)
- # beginners (85)
- # biff (7)
- # calva (10)
- # cider (5)
- # cljsrn (32)
- # clojure (6)
- # clojure-czech (3)
- # clojure-europe (10)
- # clojure-russia (4)
- # clojure-uk (3)
- # clojurescript (5)
- # core-typed (7)
- # data-science (13)
- # datomic (43)
- # etaoin (4)
- # fulcro (22)
- # graphql (3)
- # gratitude (1)
- # helix (1)
- # joyride (2)
- # liquid (10)
- # malli (16)
- # off-topic (10)
- # other-languages (1)
- # polylith (10)
- # reitit (3)
- # scittle (7)
- # shadow-cljs (103)
- # tools-deps (10)
- # vim (9)
- # xtdb (2)
This is a case where we could use finer grained backdoors to the type system. The current workaround is to use (t/ann ^:no-check ...)
on the var/s that contain update
possibly something like (^::t/unchecked-fn update ...)
so the args are checked but not the application itself.
Try this as a workaround in https://github.com/typedclojure/typedclojure/blob/main/CHANGELOG.md#1030-20220504:
(^{::t/unsafe-cast t/Nothing} ^::t/ignore update ...)
Longer term, we need to convert the annotation for assoc
into one for update
https://github.com/typedclojure/typedclojure/blob/700d882ef7e004cc2908b55bef54cf715d7863e8/typed/lib.clojure/src/typed/ann/clojure.cljc#L1154-L1158
Thank @U055XFK8V for your answers. I will try that.