This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-02
Channels
- # announcements (7)
- # atom-editor (3)
- # babashka (8)
- # beginners (38)
- # biff (5)
- # calva (17)
- # cider (26)
- # clj-kondo (6)
- # clojure (49)
- # clojure-europe (47)
- # clojure-norway (19)
- # clojure-sweden (2)
- # clojure-uk (1)
- # clojurescript (22)
- # cursive (20)
- # datahike (1)
- # datomic (6)
- # etaoin (2)
- # honeysql (2)
- # hyperfiddle (36)
- # jobs-discuss (19)
- # leiningen (15)
- # malli (5)
- # off-topic (8)
- # overtone (1)
- # pathom (15)
- # pedestal (8)
- # polylith (4)
- # releases (1)
- # ring (5)
- # schema (10)
- # shadow-cljs (17)
- # timbre (3)
- # xtdb (17)
I'm a little confused about how to work with Babashka scripts. I've seen the Babashka page on the Cursive site, and tried to add a Babashka module, but I can't see any of Babashka's built in libraries in Cursive. Does that mean I don't have my project set up properly? If we're not pulling in other libraries do we need to have a project set up, or can we just open a script that's sitting in an otherwise empty directory?
A couple of things to check here: 1. Did you mark your scripts as Babashka scripts once you had added Babashka to the module? 2. Have you tried closing your project and reopening it? The underlying IntelliJ functionality seems a little flakey in this use case and that sometimes helps.
Thanks -- I really appreciate your reply. I have marked the file as a Babashka script, and I tried closing and reopening. When I did that, I got a long stack trace:
java.io.FileNotFoundException: /tmp/bb-deps7/.cpcache/4AA116F410A418E8F23C7FA5958AB68E.basis (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.
at
at
at
at
at
at
at
at
at
at
at
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$basis_for.invokeStatic(project.clj:352)
at cursive.deps.project$basis_for.invoke(project.clj:310)
at cursive.deps.project$project_details$fn__20579.invoke(project.clj:477)
at clojure.lang.PersistentArrayMap.kvreduce(PersistentArrayMap.java:429)
at clojure.core$fn__8525.invokeStatic(core.clj:6908)
at clojure.core$fn__8525.invoke(core.clj:6888)
at clojure.core.protocols$fn__8257$G__8252__8266.invoke(protocols.clj:175)
at clojure.core$reduce_kv.invokeStatic(core.clj:6919)
at clojure.core$reduce_kv.invoke(core.clj:6910)
at cursive.deps.project$project_details.invokeStatic(project.clj:474)
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.babashka.BabashkaFacetEditorTab$Companion$downloadBabashkaVersions$1$1.run(Babashka.kt:470)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:434)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:132)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:484)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:248)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:248)
at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:498)
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)
(This isn't terribly important -- I can edit my scripts and run them. So don't go to too much trouble.)
I was getting a similar exception: .cpcache/<random string>.basis no such file I fixed it by Settings > Build, Execution, Deployment > Build Tools > Clojure Deps > deps.clj version: 1.11.1.1403 IntelliJ 2023.3.2 (Community), Cursive 1.13.1-2023.3
That didn't fix it for me. Is 1.11.1.1403 the version of deps you're actually running, or did you set it to a different version?
Can confirm the problem. I updated deps-clj from 1413 to 1435 and started running into this [PROJECT]/.cpcache/[HASH].basis (No such file or directory)
error when trying to run tests using Cursive. Downgrading to 1413 solved the problem.
@U0567Q30W Are you aware of this issue?
Hi! Is there anything I could do to help figure out what's wrong?
Does upgrading to the latest EAP fix this problem? I can’t see anything new in deps.clj since I looked at https://github.com/cursive-ide/cursive/issues/2867, which is fixed in the current EAP series (and is one of the main reasons I want to get a stable build for it out soon).
FYI: When I changed Clojure Deps versions, I got "Exception report #41675 updated."
Updated to 1.11.1.1435 and Cursive 1.13.2-eap5 and the [PROJECT]/.cpcache/[HASH].basis (No such file or directory)
error does not appear anymore when running tests.
Thanks!