Fork me on GitHub
#cursive
<
2020-12-09
>
onetom10:12:20

how does Cursive determines whether a deps path should be a Sources root or a Test sources root? can i somehow avoid this? manually marking the folder as sources root is not enough; Refresh Clojure Deps Project reverts it back to test sources. i have a directory which has only 1 clj file in it and it keeps being recognized as test sources. it doesn't contain tests, though im requiring clojure.test in it, because i've implemented some feature using kaocha.runner/-main.

cfleming10:12:06

Source roots are marked as tests if they’re in the test alias. This isn’t configurable at the moment. I made a change a while ago to allow arbitrary source roots to be marked as test roots and Cursive would leave them that way, but I haven’t made the equivalent change in the other direction (which would basically be to leave all source root type markings alone).

cjmurphy11:12:28

I just have an alias with a different name: :tset.

:tset      {:extra-paths ["src/test"]}

hadils16:12:35

Hi I am using Intellij Ultimate 2020.3 with Cursive. One change I've noticed is that the namespace no longer shows up in my local REPL tab. Is there a way I can fix this?

manutter5116:12:42

(That’s an email from Colin talking about Cursive 1.10.0-eap1 — he mentions a bug in 2020.3 related to namespaces, not sure if that’s the same thing you’re talking about

JAtkins20:12:09

How can I figure out what is wrong with stubs generation? I'm seeing some error appearing when I try to generate them for my project, but the description only contains the *out* of the clj process, which isn't very enlightening. AFAICT there shouldn't be any errors at all.

JAtkins21:12:12

Actually, could it be related to this: https://github.com/cursive-ide/cursive/issues/2066 . I get a warning from slf4j

JAtkins21:12:28

It's printed on *err* though

JAtkins21:12:12

I can silence my *err* stream with "-Dorg.eclipse.jetty.util.log.announce=false" . I put that in my dev alias (which is enabled in the project view). It removes all prints to *err* while starting the repl, but it appears that this option is not applied while building stubs... How do I control the build of the stub generator?

JAtkins22:12:20

After much ado, I realized that I could put

(java.lang.System/setProperty "org.eclipse.jetty.util.log.announce" "false")
in my user.clj. That fixes it. However, can this be documented elsewhere? This was a 1.5 ish hour problem, and it's not obvious at all that cursive is doing it's own thing without deps.edn, and that it crashes on anything printed to *err* (except those redefinition warnings).

cfleming01:12:25

I’ll document that and add it to the troubleshooting page in the userguide, thanks. The short answer is that when you run an external process, having output on stderr is often the only way to know that a problem occurred - I’ve seen a lot of cases where the process exit code isn’t set to an error condition.

JAtkins01:12:16

Right. I just never thought of it. Perfectly reasonable behavior, once you’ve thought of it :)

JAtkins20:12:06

Also, I accidentally clicked Disable on the stub generation failure popup... I see nothing in either main settings or project settings to undo that. I don't see a diff in my project files, so I have no idea how to undo this ;p

JAtkins22:12:43

Found under Project Settings -> Modules -> (Clojure Tab) -> Create stubs if required

JAtkins22:12:40

anyway, all of that was me trying to get rewrite-clj.potemkin/import-vars to resolve correctly as potemkin/import-vars. Unfortunately, this is still not working. After invalidating cache and rebuilding stubs and verifying that the macro is resolved as potemkin/import-vars, documentation/autocomplete still don't work.

cfleming01:12:25

That should work, I think - I’ll have a look at that and see if I can reproduce it.

JAtkins01:12:52

Thanks. This usually works fine, but something is weird today :/. Btw I’m on IntelliJ 2020.3 and cursive eap