What's the status of carve & cljs? I have some very obviously in-use vars being highlighted by carve.
Does it maybe struggle with fns used as vars?
(defn foo [] )
(identity foo)
?@borkdude I think it's upset because I do (defonce init (mount))
to mount the application... which is unused, which then everything is transitiviely unused too...
Adding that ns to the ignored ns seems to have sorted it!
kewl!
40 unused vars to clean up :)
When I put this in a file foo.cljs
and run carve over it:
(defn foo [])
(identity foo)
it doesn't report anything. But when I remove (identify foo)
it reports foo
as unused.Invoked as:
clojure -A:carve --opts '{:paths ["/tmp/foo.cljs"]}'
so I can't repro what you are saying
Responded in the other message. With this code I couldn't repro your problem. If you have another piece of code that can reproduce it, I'd be happy to take another look
I will take a look with a real repro, thanks for going so far with it.
I suspect it might be due to the use of foreign libs in clojurescript
So instead of identity, it's a function that uses a npm namespace