Fork me on GitHub
#cursive
<
2021-02-22
>
Jakub Holý (HolyJak)11:02:58

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 Marttila12:02:35

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

Jakub Holý (HolyJak)16:02:45

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

Kari Marttila19:02:46

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.

R.A. Porter17:02:45

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. Porter17:02:45

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)

borkdude17:02:30

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

R.A. Porter17:02:00

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

borkdude17:02:34

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

R.A. Porter17:02:03

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

Jordan Robinson17:02:02

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

R.A. Porter17:02:43

I’m still on 2020.3.2.

Jordan Robinson17:02:52

ah sorry, it was a long shot anyway

👍 3
R.A. Porter17:02:29

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. Porter17:02:06

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

R.A. Porter17:02:09

brew upgraded clj. >_<

alex-eberts19:02:02

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. Porter19:02:03

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

👍 3
mikejcusack23:02:50

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

alex-eberts19:02:17

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

cfleming20:02:34

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

💯 3
Alex Miller (Clojure team)20:02:50

is it something I broke?

cfleming21:02:18

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

Alex Miller (Clojure team)21:02:18

I know, just wondering what it was

cfleming23:02:13

Looks like as-canonical was deleted in favour of canonicalize

Alex Miller (Clojure team)00:02:12

Ahhh. They were actually duplicates and I did some cleanup. I did do some looking to see if anyone would be affected but can’t see yours of course. Sorry about that...

cfleming00:02:43

No worries. I’m checking to see if I can run some sanity check tests when you check something in to deps, but it’s looking tricky.

cfleming00:02:25

I’m not even sure why I was using as-canonical since I used canonicalize in a different spot to check for the functionality being present.

Alex Miller (Clojure team)04:02:21

these releases are typically available for at least a few days as prereleases before I officially release - I usually announce those on #tools-deps and #releases

Alex Miller (Clojure team)04:02:46

tracking that would probably at least give you a heads up

cfleming07:02:01

Ok, thanks - I’m trying to figure this out at the moment. So everything that’s under releases at Github is an official release, correct?

cfleming08:02:52

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

Alex Miller (Clojure team)13:02:25

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

kenny21:02:25

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

Alex Miller (Clojure team)21:02:53

the prior stable release was 1.10.2.774

6
Alex Miller (Clojure team)21:02:11

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