Fork me on GitHub
#cursive
<
2023-12-05
>
devurandom19:12:36

Cursive (EAP 10) complains /home/${USER}/.clojure/deps.edn (No such file or directory) (clicking on the three dots > "settings" shows "clojure deps", so I think this is Cursive, but it might also be Clojure Extras). I deleted ~/.clojure a few days ago, because it seemed to be outdated. clj -T${TOOL} seems to use ~/.config/clojure/ these days. Do I have to change something about Cursive's configuration?

Alex Miller (Clojure team)19:12:13

from clj perspective, it should be ok for /.clojure/deps.edn not to exist. running clj at the terminal should recreate it if it's missing. tools are looked for in the clojure config dir, but that should only be /.config/clojure if XDG_CONFIG_HOME is set. possible that if that is set in your shell, that cursive may not be seeing it

🙏 1
devurandom19:12:18

Hm, strings $"/proc/(pidof java)/environ" | rg XDG_CONFIG_HOME says that Java sees XDG_CONFIG_HOME as set to the same value as I see on the shell. I ran clj -Ttools install-latest :tool antq (because I had that tool already installed) and that does not create ~/.clojure.

Alex Miller (Clojure team)20:12:25

if you have XDG_CONFIG_HOME set, tools should install under that

cfleming20:12:26

When you say Cursive complains, where does that appear? Cursive now uses deps.clj rather than the clj tool, maybe that behaves differently?

devurandom20:12:08

"notifications", the bell icon. And there is a small popup in the bottom right corner.

cfleming20:12:50

When does that happen? When opening the project, running a REPL, etc. Does the same message appear in the logs with a trace?

devurandom20:12:40

Clicking the three dots on the notification, I can select "settings" and that lets me configure the notification behaviour of "clojure deps", at least that's how I interpret the UI.

devurandom20:12:31

Happens when opening IntelliJ. And also when opening another project in another window.

cfleming20:12:41

Right, so that’s probably Cursive doing that at some point. Usually the notifications are shown when an error comes back from deps, though (although again, that would be deps.clj these days).

cfleming20:12:05

Ok, I’ll take a look and see if I can figure out what’s happening. If there’s anything in the logs that would be useful too.

devurandom20:12:40

Found it in the logs:

2023-12-05 19:59:51,602 [   8067]   WARN - #cursive.build.BuildSystemUtil - /home/$USER/.clojure/deps.edn (No such file or directory)
java.io.FileNotFoundException: /home/$USER/.clojure/deps.edn (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
	at $fn__11648.invokeStatic(io.clj:229)
	at $fn__11648.invoke(io.clj:229)
	at $fn__11600$G__11554__11607.invoke(io.clj:69)
	at $fn__11660.invokeStatic(io.clj:258)
	at $fn__11660.invoke(io.clj:254)
	at $fn__11600$G__11554__11607.invoke(io.clj:69)
	at $fn__11622.invokeStatic(io.clj:165)
	at $fn__11622.invoke(io.clj:165)
	at $fn__11561$G__11550__11568.invoke(io.clj:69)
	at $reader.invokeStatic(io.clj:102)
	at $reader.doInvoke(io.clj:86)
	at clojure.lang.RestFn.invoke(RestFn.java:410)
	at clojure.lang.AFn.applyToHelper(AFn.java:154)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invokeStatic(core.clj:669)
	at clojure.core$slurp.invokeStatic(core.clj:7009)
	at clojure.core$slurp.doInvoke(core.clj:7009)
	at clojure.lang.RestFn.invoke(RestFn.java:410)
	at cursive.deps.project$project_details$fn__20572.invoke(project.clj:458)
	at clojure.core$map$fn__5931$fn__5932.invoke(core.clj:2759)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:343)
	at clojure.core$transduce.invokeStatic(core.clj:6946)
	at clojure.core$into.invokeStatic(core.clj:6962)
	at clojure.core$into.invoke(core.clj:6950)
	at cursive.deps.project$project_details.invokeStatic(project.clj:455)
	at cursive.deps.project$project_details.doInvoke(project.clj:425)
	at clojure.lang.RestFn.invoke(RestFn.java:537)
	at clojure.lang.Var.invoke(Var.java:414)
	at cursive.api.DelayedFn.invoke(DelayedFn.java:56)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:131)
	at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:32)
	at cursive.build.BuildSystemProjectDetails.getProjectDetails(BuildSystem.kt:45)
	at cursive.build.BuildSystemProjectsManager.reimportAllProjects$lambda$3$lambda$2(BuildSystemManager.kt:150)
	at cursive.build.BuildSystemUtil$runTask$1$1.run(BuildSystemUtil.kt:85)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:428)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:115)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:478)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:251)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:251)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:465)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)

cfleming20:12:09

Ok thanks, I’ll investigate.

devurandom20:12:20

Thanks a lot!

devurandom20:12:30

If you need anything else, please ask.

cfleming08:12:34

Unfortunately, I’m going to have to fix this in the next release. I need to release 1.13.1 because IntelliJ 2023.3 is due, but I’ll look at this for the first EAP in the next build.

ack 2