Fork me on GitHub
Erik Thorselius07:12:03

Anyone seen errors like this? I'm a bit unsure where it originates from. Is it intellj/cursive, nrepl or something in my code?


This is a Cursive thing, which might be a problem in your code, or it might be a bug in Cursive. I have an outstanding issue to provide better debug logging around this:


In the meantime, if you try the steps here:, do you see anything useful?

Erik Thorselius07:12:48

Great! Thanks, I will read

Erik Thorselius07:12:42

No output when I try to load file in repl 😞

2021-12-15 08:26:17,626 [2028144]   INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: #cursive.repl.actions
2021-12-15 08:27:35,985 [2106503]   INFO - il.indexing.FileBasedIndexImpl - Health check heartbeat


When do you see that error?


Is it as the result of some action?

Erik Thorselius07:12:38

Yes, when I run Load files in REPL it shows up where I have my cursor


So, that should output something in the log. One sec…


Just to check, this is “Load file in REPL” or “Sync files in REPL”?

Erik Thorselius07:12:57

"Load file in REPL"

Erik Thorselius07:12:11

Sync gives the same error


Actually, could you add #cursive.namespace to the debug log settings as well, and try again?

Erik Thorselius07:12:26

2021-12-15 08:39:27,655 [2818173]  DEBUG -             #cursive.namespace - Dependency cycle .../js/out/re_frame/trace.cljc -> ...static/js/compiled/out/re_frame/trace.cljc -> .../resources/public/js/out/re_frame/trace.cljc

Erik Thorselius07:12:52

Okey, here is something to work on. Maybe more on my side then


Ok, it looks like you don’t have your CLJS output directories excluded. If you do that, does it help?

Erik Thorselius07:12:00

Is it configured in my deps.edn file?


No, you’ll probably have to do that manually, sorry. How are you compiling your CLJS?

Erik Thorselius07:12:56

Good question, this is not my strong side. Could figwheel help me with this?


Figwheel is one way to compile your CLJS, yes, Shadow-CLJS is another, and you can also compile using just the straight CLJS compiler. I’m not sure how you’re doing it in your case, however. Can you find the directories mentioned in the error message? js/out, static/js/compiled/out and resources/public/js/out?


It actually looks to me like you’re getting some CLJC files in places where you should only have JS output, though, which is something you’ll have to fix in your build.


If you can find those directories, you probably want to exclude them, which means you right click them in the project view and select “Mark Directory As | Excluded”. However you’ll probably want to do that higher up in your directory hierarchy since you probably don’t want IntelliJ indexing any of your output.

Erik Thorselius07:12:04

Excluded the folder and everything works as expected. Thanks a lot!

👍 1
Colin P. Hill14:12:45

Trying to run all tests in a project with Leiningen, I'm getting this error:

java.lang.ClassCastException: class cursive.runner.ClojureTestConfiguration$getRunProfileState$state$1 cannot be cast to class com.intellij.execution.configurations.RunConfigurationBase
IDEA Ultimate 2021.2.3, Cursive 1.12.1-2021.2. Is this a known issue?


This is a bug sorry, it’s fixed for the next build:

👍 1
thanks3 1
Colin P. Hill21:12:44

So, let's suppose I keep encountering a bug where my REPL editor gets stuck in read-only mode, but I can't figure out the conditions for reproducing it. Is there any diagnostic information I could give to make that bug report possibly actionable, or should I hold off until I can figure out exactly when it's happening?


Hmm, I’m not sure. So what is going on? You suddenly can’t type in the REPL editor?

Colin P. Hill12:12:09

When you're starting up a REPL, it doesn't let you type in the editor until it finished initializing, right? I'm running into a problem where it just never releases that hold. Typing in the editor just results in a little speech bubble that says (something like; I don't have it happening now to get the exact wording) "This view is read-only". Amusingly, I can type parens, but I can't delete them or type anything else, which, come to think of it, is probably a distinct but much less problematic bug.


I see, so it’s not like it suddenly breaks, but that the REPL never accepts any input? That’s probably something as a result of the fix to stop the REPL focusing at startup, I’ll look at that. Does this happen sporadically for the same REPL run config, or are there particular configs that it always happens for and some that it doesn’t?

Colin P. Hill12:12:36

Correct, the REPL simply never becomes usable. It happens sporadically for the same config. Yesterday I had to relaunch the same REPL something like five times before I could get a usable one. It feels like a state thing, but I haven't figured out exactly what ceremony will get it to work. A few slightly uncommon things about my environment that might be culprits: • The project uses multiple Leiningen profiles to build distinct artifacts with distinct source paths. These profiles clobber each other with ^:replace directives. In order to get it to work with Cursive, I have it configured to use a custom profile that lists all the source paths, but the REPL configurations use the project's native profiles. • As a consequence of the above, I keep two REPLs running much of the time, one for each of the two major profiles in the project.

Colin P. Hill14:02:23

@U0567Q30W I think I figured this out! The REPL startup for my project is so slow that I was hitting the timeout configured in the plugin. I would get an error message saying something like "No connection details received" – but the startup would keep trucking along, and eventually a message would be printed that the REPL was started on port suchandsuch. I was ignoring the error message because it was mingled in with the unfortunately large number of spurious warnings I get on startup, and never suspected that the message might be coming from Cursive itself. So I think this is mostly working as intended, but the message could probably stand to be more prominent and clear, maybe pointing the user to the timeout setting.