cursive

Issues at: https://git.io/cursive-issues
Jakub Holý 2021-02-22T11:42:58.039700Z

Hi folks! How do you prevent mixing up clj and clojurescript repls and sending code (especially from .cljc files) to the wrong ones, any tips? @cfleming would it be perhaps possible to have different color backgrounds for clj x cljs repl? I know the name of the repl is written above it but I needed it rarely and thus normally just ignore it so it is impossible to spot that I am in the "wrong" repl.

kari 2021-02-22T12:10:35.041400Z

I have a Dygma Raise macro for switching repl, i.e. one hotkey in my Dygma Raise keyboard.

Jakub Holý 2021-02-22T16:26:45.041600Z

Thank you! Though my problem is not switching but noticing which repl I am in

R.A. Porter 2021-02-22T17:17:45.043200Z

Well. I’m completely borked this morning and can’t figure out why, or how to fix it. All my Clojure projects are blowing up and losing their deps files. I had enabled Kondo earlier so suspect that has something to do with it, but I’ve disabled and I’m still crapping out with this exception:

R.A. Porter 2021-02-22T17:17:45.043300Z

Error resolving /Users/rporter/projects/ridehealth/services/ridehealth.fltmatch/deps.edn: 

java.lang.NullPointerException
	at cursive.deps.relocate$with_deps_relocation.invokeStatic(relocate.clj:35)
	at cursive.deps.relocate$with_deps_relocation.invoke(relocate.clj:31)
	at cursive.deps.relocate$with_relocation.invokeStatic(relocate.clj:57)
	at cursive.deps.relocate$with_relocation.invoke(relocate.clj:43)
	at cursive.deps.project$project_details$fn__1234.invoke(project.clj:153)
	at clojure.core.protocols$fn__8183.invokeStatic(protocols.clj:168)
	at clojure.core.protocols$fn__8183.invoke(protocols.clj:124)
	at clojure.core.protocols$fn__8138$G__8133__8147.invoke(protocols.clj:19)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
	at clojure.core.protocols$fn__8170.invokeStatic(protocols.clj:75)
	at clojure.core.protocols$fn__8170.invoke(protocols.clj:75)
	at clojure.core.protocols$fn__8112$G__8107__8125.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6833)
	at clojure.core$reduce.invoke(core.clj:6815)
	at cursive.deps.project$project_details.invokeStatic(project.clj:129)
	at cursive.deps.project$project_details.invoke(project.clj:76)
	at clojure.lang.Var.invoke(Var.java:388)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:124)
	at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke(ClojureRuntimeShimImpl.java:117)
	at cursive.shim.ShimBootstrap$Shim.apply(ShimBootstrap.java:53)
	at cursive.deps.DepsProjectDetails$doGetDetails$details$1.invoke(Project.kt:162)
	at cursive.deps.DepsProjectDetails$doGetDetails$details$1.invoke(Project.kt:84)
	at cursive.shim.ShimProvider.withShim(Shim.kt:110)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:161)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:84)
	at cursive.build.BuildSystemProjectDetails.getProjectDetails(BuildSystem.kt:42)
	at cursive.build.BuildSystemProjectsManager$reimportAllProjects$$inlined$synchronized$lambda$1.run(BuildSystemManager.kt:148)
	at cursive.build.BuildSystemUtil$runTask$1$1.run(BuildSystemUtil.kt:93)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:962)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:472)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:834)

borkdude 2021-02-22T17:18:30.044400Z

I'm not sure what clj-kondo would have to do with this, since it doesn't do anything with deps.edn

R.A. Porter 2021-02-22T17:19:00.045Z

I don’t think it did. It was just the only change I had made.

borkdude 2021-02-22T17:19:34.045700Z

Maybe it's something in your deps.edn causing this?

R.A. Porter 2021-02-22T17:20:03.046200Z

I’ve tried other projects that haven’t been touched recently and get the same error.

2021-02-22T17:21:02.046900Z

I used to find if everything suddenly stopped working it was because snap updated my intellij (I have since stopped using snap)

R.A. Porter 2021-02-22T17:21:43.047500Z

I’m still on 2020.3.2.

R.A. Porter 2021-02-22T17:22:29.048Z

I’ve been an IJ user for 20 years and a Cursive user for about two. But right now, I’m super close to throwing it in the trash and re-learning emacs.

R.A. Porter 2021-02-22T17:24:06.048400Z

Ah. Wait…I may have made one other update external to IJ.

2021-02-22T17:24:52.048500Z

ah sorry, it was a long shot anyway

👍 1
R.A. Porter 2021-02-22T17:25:09.049Z

brew upgraded clj. >_<

kari 2021-02-22T19:26:46.049200Z

Aah, ok. I use names like "backend" and "frontend" for different repls, but still occasionally send e.g. Clojure code to frontend (Clojurescript) repl. I have the macro hotkey to quickly switch to the right repl.

2021-02-22T19:47:02.050300Z

Hi @coyotesqrl - you’ve probably already figured this out but there appears to be a problem with Cursive and clojure 1.10.2.790 : https://github.com/cursive-ide/cursive/issues/2511

R.A. Porter 2021-02-22T19:48:03.051200Z

Yep. Once I realized Clojure had updated, I remembered seeing that post the other day. Thanks!

👍 1
2021-02-22T19:48:17.051600Z

I ran into this myself yesterday evening but solved the problem by downgrading clojure with clojure homebrew tap: https://clojure.org/news/2020/02/28/clojure-tap

cfleming 2021-02-22T20:37:34.052300Z

Yes, sorry about that issue, I reproduced it yesterday and hopefully will be releasing a fix today.

💯 1
cfleming 2021-02-23T08:03:52.059800Z

Thanks, I’ll try tracking Formula using the atom feed and see how that works out.

alexmiller 2021-02-23T13:13:25.060Z

I'm going to add back in that as-canonical method (undoc'ed) to cut down on version mismatch failures

alexmiller 2021-02-22T20:53:50.052500Z

is it something I broke?

cfleming 2021-02-22T21:03:18.052700Z

It’s the same deps issue I mentioned yesterday in the other thread.

alexmiller 2021-02-22T21:09:18.052900Z

I know, just wondering what it was

kenny 2021-02-22T21:44:25.053600Z

What was the last working version of Clojure CLI + Cursive? 1.10.2.786?

alexmiller 2021-02-22T21:48:53.053900Z

the prior stable release was 1.10.2.774

✅ 2
alexmiller 2021-02-22T21:49:11.054300Z

so if you're going to pick one, I'd pick that one https://clojure.org/releases/tools

cfleming 2021-02-22T23:25:13.054400Z

Looks like as-canonical was deleted in favour of canonicalize

mikejcusack 2021-02-22T23:50:50.054900Z

I just came to check to see if this had been reported. Was wondering what was going on. I resolved it temporarily by downgrading to previous version until the fix is released. 😃