Fork me on GitHub
#cljs-dev
<
2022-09-15
>
danielcompton01:09:08

I noticed that reset! is defined on line 4521 of cljs/core.cljs and then it is later declared on line 7272. This https://github.com/cursive-ide/cursive/issues/2730 to not show the docstring for reset!, presumably because the declare is overriding the reset!. Looking back at Git history, it seems like the declare used to be https://github.com/clojure/clojurescript/blob/ef0d52541b02bcf767f2f54f497c8808c6afa91d/src/cljs/cljs/core.cljs#L2721, and then the defn reset! https://github.com/clojure/clojurescript/blob/ef0d52541b02bcf767f2f54f497c8808c6afa91d/src/cljs/cljs/core.cljs#L3853. I think that now some of those declared vars could be removed because they are already defined at the point of declaration?

danielcompton02:09:37

I took a quick scan and it seems like this:

(declare create-inode-seq create-array-node-seq reset! create-node atom deref)
could be safely rewritten to
(declare create-inode-seq create-array-node-seq create-node)

dnolen12:09:50

seems easy enough to fix, but also I think Cursive should probably understand this? since declare doesn’t change the var info?