Fork me on GitHub
#cursive
<
2019-10-16
>
scarytom08:10:43

Is there a way to suppress the "Unused global declaration" warning in a given namespace?

dmarjenburgh09:10:57

Settings -> Editor -> Inspections -> Clojure -> Unused Declaration ? I think you can assign scopes and save the config per project

flowthing12:10:31

I had this weird thing happen (on 2019.3 EAP, Cursive 1.9.0-eap5) where a tools.deps local REPL couldn't find classpath resources in my project directory. For example, ( "config.edn") returned nil even though the resources dir was in :paths. Deleting the .idea dir and *.iml fixed the issue for me. Just in case it happens to anyone else.

roklenarcic13:10:19

with the most recent update cursive started marking clojure.core functions as unresolved in a deps project

roklenarcic13:10:27

I recall this has happened before, but I forget what the fix was

roklenarcic14:10:38

nobody else had this problem?

Mark Addleman14:10:33

I've seen a couple of things cause this problem. One, project.clj or deps.edn is not registered as a project. Two, internal files are broken. You can regenerate them by File / Invalidate Caches ...

kenny15:10:41

Strangely, sometimes commenting out one of my requires and then removing the comment fixes this issue for me.

Mark Addleman20:10:31

Odd. I haven't run into that before

roklenarcic20:10:02

had to invalidate caches

👌 4
cfleming21:10:12

Yes, indexes can get corrupted sometimes, and for some reason upgrades can provoke it.

kenny15:10:50

After upgrading to eap5, I get this printed out when starting a REPL. Everything still works like usual. The message in red is new and looks like something incorrect happened.

cfleming21:10:30

Yes, I changed the way I invoke nREPL to more easily support the .nrepl.edn file, and unfortunately that message now comes out. I filed https://github.com/nrepl/nrepl/issues/167, feel free to vote over there.

4
kenny21:10:00

Is that message red because it's written to stderr?

kenny23:10:13

Weird. Why would that message make sense to send to stderr?

cfleming23:10:40

It doesn’t. I think I’m probably the first client to actually use that option.

cfleming23:10:52

I’m going to send a PR.

cfleming23:10:40

There’s also a bug there - the nil is printed out because the send-ack invocation is indented incorrectly.

scarytom17:10:03

@dmarjenburgh I want to suppress it in one file, and check that change in for everyone on my team

cfleming23:10:10

@t.denley You should be able to do this by going to Preferences | Editor | Inspections, then selecting Clojure | Unused Declaration, then selecting a scope in the dropdown to the right of Severity. You’ll have to define a custom scope for what you want: https://www.jetbrains.com/help/idea/settings-scopes.html

cfleming23:10:03

You can ensure that your config is shared by ensuring that the Profile (at the top of the dialog) is a Project one.