I don't know if this is a cursive or idea question, but when I paste a multline string, the newlines are converted to "\n". I'm writing prose, and this part of the IDE I would rather worked like a word processer :-)
Is there a setting to change this behaviour?
Try "Paste as Plain Text":
Thanks
I have a project with many modules. Stub generation fails for one of them, and I can't figure out which. A message keeps popping up with "Stub generation required", and when I choose "Generate now" it fails with a stacktrace. 🧵
The stacktrace is this:
Exit code: 1
java.lang.ExceptionInInitializerError
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:534)
at java.base/java.lang.Class.forName(Class.java:513)
at clojure.lang.RT.classForName(RT.java:2229)
at clojure.lang.RT.classForName(RT.java:2238)
at clojure.lang.RT.loadClassForName(RT.java:2257)
at clojure.lang.RT.load(RT.java:469)
at clojure.lang.RT.load(RT.java:444)
at clojure.core$load$fn__6931.invoke(core.clj:6189)
at clojure.core$load.invokeStatic(core.clj:6188)
at clojure.core$load.doInvoke(core.clj:6172)
at clojure.lang.RestFn.invoke(RestFn.java:411)
at clojure.core$load_one.invokeStatic(core.clj:5961)
at clojure.core$load_one.invoke(core.clj:5956)
at clojure.core$load_lib$fn__6873.invoke(core.clj:6003)
at clojure.core$load_lib.invokeStatic(core.clj:6002)
at clojure.core$load_lib.doInvoke(core.clj:5981)
at clojure.lang.RestFn.applyTo(RestFn.java:145)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.core$load_libs.invokeStatic(core.clj:6044)
at clojure.core$load_libs.doInvoke(core.clj:6028)
at clojure.lang.RestFn.applyTo(RestFn.java:140)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.core$require.invokeStatic(core.clj:6066)
at clojure.core$require.doInvoke(core.clj:6066)
at clojure.lang.RestFn.invoke(RestFn.java:515)
at taoensso.carmine$loading__6812__auto____6513.invoke(carmine.clj:1)
at taoensso.carmine__init.load(Unknown Source)
at taoensso.carmine__init. (Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:534)
at java.base/java.lang.Class.forName(Class.java:513)
at clojure.lang.RT.classForName(RT.java:2229)
at clojure.lang.RT.classForName(RT.java:2238)
at clojure.lang.RT.loadClassForName(RT.java:2257)
at clojure.lang.RT.load(RT.java:469)
at clojure.lang.RT.load(RT.java:444)
at clojure.core$load$fn__6931.invoke(core.clj:6189)
at clojure.core$load.invokeStatic(core.clj:6188)
at clojure.core$load.doInvoke(core.clj:6172)
at clojure.lang.RestFn.invoke(RestFn.java:411)
at clojure.core$load_one.invokeStatic(core.clj:5961)
at clojure.core$load_one.invoke(core.clj:5956)
at clojure.core$load_lib$fn__6873.invoke(core.clj:6003)
at clojure.core$load_lib.invokeStatic(core.clj:6002)
at clojure.core$load_lib.doInvoke(core.clj:5981)
at clojure.lang.RestFn.applyTo(RestFn.java:145)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.core$load_libs.invokeStatic(core.clj:6044)
at clojure.core$load_libs.doInvoke(core.clj:6028)
at clojure.lang.RestFn.applyTo(RestFn.java:140)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.core$require.invokeStatic(core.clj:6066)
at clojure.core$require.doInvoke(core.clj:6066)
at clojure.lang.RestFn.invoke(RestFn.java:411)
at cursive.stubs.metadata.clojure$read_ns.invokeStatic(clojure.clj:67)
at cursive.stubs.metadata.clojure$read_ns.invoke(clojure.clj:66)
at user$eval253.invokeStatic(create-stub6920679738640993230.clj:2)
at user$eval253.invoke(create-stub6920679738640993230.clj:2)
at clojure.lang.Compiler.eval(Compiler.java:7700)
at clojure.lang.Compiler.load(Compiler.java:8165)
at clojure.lang.Compiler.loadFile(Compiler.java:8103)
at clojure.main$load_script.invokeStatic(main.clj:476)
at clojure.main$script_opt.invokeStatic(main.clj:536)
at clojure.main$script_opt.invoke(main.clj:531)
at clojure.main$main.invokeStatic(main.clj:665)
at clojure.main$main.doInvoke(main.clj:617)
at clojure.lang.RestFn.applyTo(RestFn.java:140)
at clojure.lang.Var.applyTo(Var.java:707)
at clojure.main.main(main.java:40)
Caused by: clojure.lang.ArityException: Wrong number of args (1) passed to: taoensso.encore/assert-min-encore-version
at clojure.lang.AFn.throwArity(AFn.java:429)
at clojure.lang.AFn.invoke(AFn.java:32)
at taoensso.timbre__init.load(Unknown Source)
at taoensso.timbre__init. (Unknown Source)
... 70 more
There is no information which module is failing. The offending library (Encore) is a direct or transitive dependency of many/most of the modules. It's hard do know where to start without this information. idea.log doesn't seem to provide any clues either.OK, I found the module - the name was right there in the notification: "Disable stub generation for module <foo>". Now I need to find out why that ArityException is thrown.
Looks like some kind of version conflict, maybe? If there's something Cursive could do better here, I'm all ears - looks like putting the module name in the error message as well as the action name would help.
Yes, that would help. Also showing the rest ("... 70 more") of the stacktrace if possible? Still working through it - I'll try to upgrade the Timbre/Encore/Carmine libs and see what happens, it is long overdue anyway.
Yeah, somehow that did it. It was a mess of older versions, in a combination of deps.edn and Leiningen projects, with some transient dependencies for good measure.
Is this a thing I could do in Cursive? • I select some code and press keycombo 1 • If I press keycombo 2, it runs the code selected in keycombo 1
should be possible with custom repl commands (https://cursive-ide.com/userguide/repl.html#repl-commands) but you might need to write the current selection to a file or some well-known memory location in the first command to grab it again in the second.
That’s a smart solution.
IDK if anyone has requested this before, but right-click on a package and send all child ns tests to the REPL would be legit.
an analogous functionality for running all tests in a package would also be super handy