Fork me on GitHub

Is it a known issue that JS method calls such as (.getElementById js/document "app") reports that .getElementById cannot be resolved? Another one I've noticed is the use of underscores in destructuring.


(a record using a protocol, and cursive not knowing about the usage)


I can resolve from the record to the protocol but not the inverse


Any Cursive devs around?


@gphilipp Yes, I’m afraid the answer is “don’t do that” for the reasons that boris points out. It’s a tricky one though, since Clojure doesn’t really have a spec to speak of. The reader page is pretty clear on that issue though. Unfortunately the Clojure reader accepts all kinds of garbage 😞


@kenny that’s weird - I’ll take a look but it’s unlikely to be something I can fix, that’s probably at the IntelliJ level I think.


@whoneedszzz Yes, JS resolution doesn’t work very well, mostly because JS. I’m actually in the process of upgrading this somewhat so it’ll soon get better, but I’m also going to reduce the level of that warning since it’s basically impossible to do correctly.


Ok that makes sense and not a big deal. I've just been ignoring the warnings, but it does unfortunately cause a ton of false warnings that when trying to eliminate those so I don't miss actual warnings and errors in my commits it is more difficult. So that explains that, but what about the underscores in destructuring?


Can you give me an example of that?


 (fn-traced [_ _]


I tested and the issue is with fn-traced being a macro. If I change it to fn the warning goes away.


You can fix that using the Resolve as… functionality, see: The screenshots are out of date, there’s now a Specify… option where you can resolve fn-traced as fn.


Ok that worked, thanks. Now just have the JS issues


@joelsanchez Not known to me, no - an issue would be great, thanks.