After the update to 2025.2-252 the stubs generation started failing for all my modules. They all fail like this:
Exit code: 1
java.io.FileNotFoundException: /Users/martin/Library/Caches/JetBrains/IntelliJIdea2025.2/cursive_stubs_bc80193/2258157e-tmp/3bcfde70.clj (No such file or directory)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:289)
at java.base/java.io.FileOutputStream. (FileOutputStream.java:230)
at $fn__11657.invokeStatic(io.clj:233)
at $fn__11657.invoke(io.clj:233)
at $fn__11581$G__11563__11588.invoke(io.clj:72)
at $fn__11669.invokeStatic(io.clj:266)
at $fn__11669.invoke(io.clj:262)
at $fn__11581$G__11563__11588.invoke(io.clj:72)
at $fn__11631.invokeStatic(io.clj:169)
at $fn__11631.invoke(io.clj:169)
at $fn__11594$G__11559__11601.invoke(io.clj:72)
at $writer.invokeStatic(io.clj:122)
at $writer.doInvoke(io.clj:107)
at clojure.lang.RestFn.invoke(RestFn.java:413)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.RestFn.applyTo(RestFn.java:135)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.core$spit.invokeStatic(core.clj:7101)
at clojure.core$spit.doInvoke(core.clj:7101)
at clojure.lang.RestFn.invoke(RestFn.java:428)
at user$eval262.invokeStatic(create-stub6687736211318130844.clj:3)
at user$eval262.invoke(create-stub6687736211318130844.clj:3)
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.lang.RT$3.invoke(RT.java:347)
at user$eval5.invokeStatic(form-init11828023172437321893.clj:1)
at user$eval5.invoke(form-init11828023172437321893.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:7700)
at clojure.lang.Compiler.eval(Compiler.java:7690)
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$init_opt.invokeStatic(main.clj:478)
at clojure.main$init_opt.invoke(main.clj:478)
at clojure.main$initialize.invokeStatic(main.clj:509)
at clojure.main$null_opt.invokeStatic(main.clj:543)
at clojure.main$null_opt.invoke(main.clj:540)
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)
I've tried invalidating caches & restarting. The /Users/martin/Library/Caches/JetBrains/IntelliJIdea2025.2/cursive_stubs_bc80193 exists and is writable.
Is there something I can do to make it work again?Wow, very strange. Well, let me know if it recurs, otherwise I'll optimistically write it off to random factors 🙂
I'll look at this today.
Does 2258157e-tmp exist inside cursive_stubs_bc80193?
No:
~/L/C/J/I/cursive_stubs_bc80193 $ ls -l
total 0
drwxr-xr-x@ 5 martin staff 160 12 aug 09:24 1a28f57d/
drwxr-xr-x@ 3 martin staff 96 12 aug 09:24 d5c8af48/
drwxr-xr-x@ 3 martin staff 96 12 aug 09:24 d5c8c43b/
drwxr-xr-x@ 3 martin staff 96 12 aug 09:25 e34c6085/
drwxr-xr-x@ 3 martin staff 96 12 aug 09:24 e3556ea8/
But I noticed yesterday, during the stubs generation, that one or more dirs named <something>-tmp where there temporarily.Yes, the stubs are created in a tmp directory which is then atomically moved into the right name.
I'll check what might be happening with that directory, I don't think anything has changed here in a while but I'll check that too.
Can you try the following: 1. Help | Diagnostic Tools | Debug Log Settings.... 2. Enter "cursive.stubs" in the box that pops up, and click Ok. 3. Reproduce the problem and then send me the logs. That will hopefully shed a bit more light on why this is happening.
Also, I think you were on the Cursive EAP before upgrading, right? Were you also on the IntelliJ EAP, or have you just upgraded from 2025.1?
I've looked through the git log, nothing substantial has changed here in a long time, so I'm not sure why this would suddenly start happening. Hopefully the log will help figure out what's going on.
Well, now that I was trying to reproduce the problem, it just... works. I did one thing, though: delete a few cursive_stubs_* folders that where lying around with timestamps from 2024.
Yes, I was on Cursive EAP, but not IntelliJ EAP. Just upgraded from 2025.1 (a few days ago, don't quite remember).
Anyway, thanks for looking in to this!