cloroutine
cloroutine copied to clipboard
[cljs] Warning when specter's setval is used in async
Hi!
When specter's setval is called within an async block the following warning appears:
------ WARNING #1 - :redef-in-file ---------------------------------------------
File: /tmp/naked/src/naked/core.cljs:11:22
--------------------------------------------------------------------------------
8 | (defn start []
9 | (async
10 | (let [user-info {:hello {:thing "hihi"}}
11 | user-info2 (setval [:hello :thing] "haha" user-info)]
----------------------------^---------------------------------------------------
pathcache26917 at line 11 is being replaced
--------------------------------------------------------------------------------
12 | (println user-info)
13 | (println user-info2))))
14 |
--------------------------------------------------------------------------------
There are no warnings inside a go block, see master vs go branch: https://github.com/Wonko7/warning-specter-async
setval
emits a def
, then cr
wraps it in a letfn
, and this combination seems to confuse the compiler.
I filed an issue with a minimal repro.
Thanks!