This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-15
Channels
- # adventofcode (110)
- # announcements (30)
- # aws (2)
- # babashka (39)
- # babashka-sci-dev (112)
- # beginners (155)
- # calva (5)
- # cider (12)
- # clj-kondo (11)
- # cljs-dev (1)
- # cljsrn (2)
- # clojure (144)
- # clojure-australia (2)
- # clojure-europe (14)
- # clojure-nl (5)
- # clojure-spec (3)
- # clojure-uk (2)
- # clojurescript (22)
- # core-async (23)
- # cursive (31)
- # data-science (3)
- # emacs (12)
- # events (1)
- # fulcro (8)
- # honeysql (7)
- # jobs-discuss (11)
- # lsp (1)
- # missionary (28)
- # nextjournal (7)
- # off-topic (64)
- # pedestal (3)
- # polylith (19)
- # reagent (14)
- # reitit (12)
- # releases (4)
- # shadow-cljs (33)
- # tools-deps (3)
- # xtdb (3)
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: https://github.com/cursive-ide/cursive/issues/2612.
In the meantime, if you try the steps here: https://github.com/cursive-ide/cursive/issues/1432#issuecomment-538613756, do you see anything useful?
Great! Thanks, I will read
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
Yes, when I run Load files in REPL it shows up where I have my cursor
"Load file in REPL"
Sync gives the same error
Actually, could you add #cursive.namespace
to the debug log settings as well, and try again?
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
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?
Is it configured in my deps.edn file?
No, you’ll probably have to do that manually, sorry. How are you compiling your CLJS?
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.
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: https://github.com/cursive-ide/cursive/issues/2621
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?
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?
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.
@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.