Fork me on GitHub

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.


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).


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

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


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?


(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


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.


Actually, could it be related to this: . I get a warning from slf4j


It's printed on *err* though


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?


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).


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.


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


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


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


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.


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


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