Fork me on GitHub
#cursive
<
2022-02-21
>
souenzzo12:02:11

Hey @cfleming. Every time that I try to generate stubs I receive this error: I'm using t.d.a. 0.10.895 because: • t.d.a. 0.11.x has a deadlock issue • t.d.a. 0.12.x "fails to create a shim" • using /usr/bin/clojure (mine is 1.10.3.1075 ) fails to generate stubs too, but do not generate ANY error in idea.log https://gist.github.com/souenzzo/5808a677c539bbf353600c1cd38fdd9a

imre12:02:25

Stupid question: is cursive still indexing when you try to click generate stubs?

souenzzo13:02:29

nope. I already did a lot of things, like leave the IDE idle (any indexing/background process), wait a few minutes (to ensure that there is nothing running), wait, reboot, wait again, then click... always end up in the same error

souenzzo13:02:02

this is just in one (huge) project, with 50kloc of code, splited in 20 projects/<sub-project>/deps.edn

imre13:02:11

invalidate caches dance?

souenzzo13:02:15

in other small/simple projects stubs works

souenzzo13:02:07

@U08BJGV6E I'm asking again because last week I bought a new machine, configured it from scratch (no backup/restore) and I still have the same error 😅

imre13:02:04

is it an m2 by any chance?

souenzzo13:02:04

I would like to have some better error reporting on it. I mean, "Error trying to generate stubs for this jar on this project "

imre13:02:25

That would be helpful, yeah

souenzzo13:02:47

As I said, this project has ~20 subprojects. I'm sure that is one of these that have a wired (probably, devtime) dependency that makes cursive unhappy In my case, it is more practical to remove this subproject (from cursive indexing/intellij config) and ignore for now Also, know which namespace/jar/project will definitively help to reproduce in another machine and fix the problem

souenzzo19:02:48

@cfleming did you changed anything? I didn't anything updating

souenzzo19:02:35

Fixed the missing dep, now

com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
	at com.intellij.openapi.project.IndexNotReadyException.create(IndexNotReadyException.java:67)
	at com.intellij.util.indexing.FileBasedIndexImpl.handleDumbMode(FileBasedIndexImpl.java:852)
	at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:804)
	at com.intellij.util.indexing.FileBasedIndexEx.processExceptions(FileBasedIndexEx.java:244)

cfleming06:02:09

@U2J4FRT2T No, nothing has changed in that code in a long time. The IndexNotReadyException definitely means that IntelliJ is indexing. Perhaps something is always provoking the indexing as part of the stub creation process? I can’t imagine what it could be, though.

cfleming06:02:25

I’m also about to make a new release of Cursive which patches the problem with t.d.a 0.12.x, so you could also try that. Seems unlikely, though.

👍 1
cfleming06:02:20

I’ll see about improving that error message to report the module as you suggest, too - thanks.

cfleming00:02:33

@U2J4FRT2T Just to let you know that I haven’t forgotten about this. I’ve pinged JetBrains to get some help diagnosing why your indexing is kicking off, I’m still waiting to hear back.

cfleming20:02:15

Ok, you could try this: go to Help | Edit Custom VM options… and add -Dtrace.file.based.index.update=true. For good measure you could also go to Help | Diagnostic Tools | Debug log settings… and add #com.intellij.util.indexing.FileBasedIndexImpl there. Then restart your IDE, and reproduce the problem. Hopefully you’ll see lines in your log from FileBasedIndexImpl, let me know what they look like. If you’d rather send them privately, email me at <mailto:[email protected]|[email protected]>.

souenzzo02:02:11

@cfleming I think that I will do it just on next will.

👍 1
Andrea16:02:49

I might have messed up my IJ/Cursive configuration and can no longer connect to nREPLs started by shadow cljs. When I connect my application logs a bunch of errors similar to the following

Unhandled REPL handler exception processing message {:code (try (clojure.core/cond (clojure.core/resolve (quote cljs.core/*clojurescript-version*)) :cljs (java.lang.System/getProperty "babashka.version") :babashka :else :clj) (catch java.lang.Throwable _ex__17614__auto__ nil)), :id 4b47f473-2c00-449a-9c7e-aeb0b94bc71a, :op eval, :session 0ed152b0-39af-480c-a0cb-638f00598290}
Syntax error macroexpanding at (cider/nrepl/inlined_deps/orchard/v0v9v1/orchard/java/parser.clj:1:1).
	at clojure.lang.Compiler.load(Compiler.java:7665)
	at clojure.lang.RT.loadResourceScript(RT.java:381)
	at clojure.lang.RT.loadResourceScript(RT.java:372)
	at clojure.lang.RT.load(RT.java:459)
	... 
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: jdk.javadoc.doclet.Doclet
	at java.base/java.net.URLClassLoader.findClass(Unknown Source)
	at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:69)
is the cider/nrepl path kind of expected in the stack? has this happened to any of you before?

cfleming20:02:36

No, that shouldn’t be there. Do you have it in your user deps.edn or project.clj?

Andrea10:02:27

Thank you! I’ll dig deeper into how cider/nrepl lands there, it sure injects some middleware that’s causing troubles...

Andrea11:02:53

Indeed, not requiring cider/cider-nrepl 0.26.0 from the alias which I use for starting shadow fixes it. That dependency has been around for a while in the project, but only recently started to make troubles. I’ve always been connecting over shadow nREPL in the past

imre12:02:44

set this up, fingers crossed

👍 1
jasonjckn23:02:19

having some stability issues hbu ?

imre08:02:13

No problems so far but I haven't pushed it too much since setting it up

👍 1
imre08:02:59

IntelliJ IDEA 2021.3.2 (Community Edition)
Build #IC-213.6777.52, built on January 28, 2022
Runtime version: 17.0.2+8-b315.1 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.2.1
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Registry:
    scala.erase.compiler.process.jdk.once=false

Non-Bundled Plugins:
    org.intellij.plugins.hcl (0.7.15)
    net.seesharpsoft.intellij.plugins.csv (2.18.2)
    name.kropp.intellij.makefile (213.5744.224)
    de.thomasrosenau.diffplugin (2.1.8-imrekoszo)
    com.jetbrains.plugins.ini4idea (213.5744.190)
    org.jetbrains.kotlin (213-1.6.10-release-961-IJ6777.52)
    org.jetbrains.idea.grammar (2021.1.2)
    gherkin (213.6461.19)
    dev.monogon.cuelang (0.8.3)
    org.asciidoctor.intellij.asciidoc (0.36.18)
    StringToolsPlugin (4.0)
    String Manipulation (9.2.0)
    Key Promoter X (2021.3)
    mobi.hsz.idea.gitignore (4.3.0)
    com.cursiveclojure.cursive (1.12.2-eap5-2021.3)
    com.github.shinichy.integrant (0.1.1)
    com.github.brcosta.cljstuffplugin (0.6.0)
    EDN-JSON Converter (0.0.5)
    org.intellij.scala (2021.3.18)

Kotlin: 213-1.6.10-release-961-IJ6777.52

imre10:02:11

It appears cmd+backtick switching between IJ windows doesn't work with this

👀 1
jasonjckn18:03:44

do you use vim plugin? i changed all the keymaps

imre19:03:08

I'm not a modal person so not using ideavim. I did change most keybindings though. Cmd+backtick is a macos shortcut however and it works in other apps

👍 1