This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-21
Channels
- # announcements (1)
- # architecture (1)
- # beginners (125)
- # boot (6)
- # boot-dev (2)
- # calva (69)
- # cider (38)
- # cljs-dev (3)
- # clojure (212)
- # clojure-austin (7)
- # clojure-australia (1)
- # clojure-denver (2)
- # clojure-europe (3)
- # clojure-gamedev (1)
- # clojure-hamburg (8)
- # clojure-italy (10)
- # clojure-nl (31)
- # clojure-russia (3)
- # clojure-uk (57)
- # clojurescript (56)
- # core-async (3)
- # cursive (15)
- # datascript (1)
- # duct (28)
- # emacs (6)
- # events (1)
- # figwheel-main (11)
- # fulcro (22)
- # luminus (59)
- # lumo (2)
- # onyx (4)
- # overtone (1)
- # re-frame (1)
- # reagent (4)
- # remote-jobs (3)
- # rum (2)
- # shadow-cljs (84)
- # spacemacs (7)
- # speculative (5)
- # vim (1)
- # yada (127)
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.
@cfleming is this known?
(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?
(re-frame/reg-event-db
::initialize-db
(fn-traced [_ _]
db/default-db))
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: https://cursive-ide.com/userguide/macros.html. 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.