This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # architecture (3)
- # aws-lambda (1)
- # babashka (7)
- # beginners (60)
- # calva (33)
- # chlorine-clover (8)
- # cider (24)
- # circleci (4)
- # clj-kondo (13)
- # cljs-dev (1)
- # cljsrn (12)
- # clojure (76)
- # clojure-australia (6)
- # clojure-europe (100)
- # clojure-france (1)
- # clojure-nl (13)
- # clojure-uk (16)
- # clojurescript (49)
- # conjure (1)
- # cryogen (8)
- # datomic (43)
- # dirac (3)
- # etaoin (1)
- # exercism (4)
- # fulcro (32)
- # jobs (2)
- # kaocha (4)
- # nginx (1)
- # off-topic (106)
- # pathom (8)
- # reagent (5)
- # reitit (5)
- # sci (52)
- # shadow-cljs (37)
- # tools-deps (30)
- # tree-sitter (18)
- # xtdb (18)
So good with the new stack traces, @brandon.ringe! I almost smile when my code crashes now. 😃
Somebody just whispered into my ear that clj-kondo can do “find usages”. Is this available as a command in Calva somehow?
It's actually used by Calva for adding debugger decorations to instrumented functions and their usages. This part uses clj-kondo as a library. So, I guess it could be used in a more explicit feature for finding usages.
Just try this old VSIX and you'll feel the power 😃 https://8510-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.80-feat-lsp-client-27da0c33.vsix
Or try this one which has 995 additional commits merged 😃 https://8515-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.131-feat-lsp-client-0efee118.vsix
And here is one with the latest clojure-lsp, which includes clj-kondo https://8520-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.131-feat-lsp-client-679f33ff.vsix
I am not sure how to go about it. If you two guys have some time to have a video chat we can discuss what the shape of this challenge is and maybe formulate a plan to tackle it.
I’m fine with waiting for your plate to clear up a bit. I think that if we talk about this task a bit, the three of us, we can find a better plan than just one or two of us would.
I’m just getting started with Calva, so please forgive rookie errors. I’m getting loads of errors in the terminal whenever I jack-in (I don’t know how many because they exceed the number of lines the terminal retains). The errors are all of the form:
I saw a mention in the slack archive from a few weeks back where the suggestion was to start VSCode from the command line using
java.lang.NullPointerException: Cannot invoke "jdk.javadoc.internal.doclets.formats.html.HtmlConfiguration.getOptions()" because "this.configuration" is null at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDoclet.getSupportedOptions(HtmlDoclet.java:292) at jdk.javadoc/jdk.javadoc.doclet.StandardDoclet.getSupportedOptions(StandardDoclet.java:93) at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java.parser$parse_java$reify__3373.getSupportedOptions(parser.clj:77) at jdk.javadoc/jdk.javadoc.internal.tool.Start.getSupportedOptionsOf(Start.java:645) at jdk.javadoc/jdk.javadoc.internal.tool.Start.consumeDocletOption(Start.java:593) at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseArgs(Start.java:799) at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:497) at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:399) at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:361) at jdk.javadoc/jdk.javadoc.internal.api.JavadocTaskImpl.call(JavadocTaskImpl.java:104) at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java.parser$parse_java.invokeStatic(parser.clj:87) at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java.parser$parse_java.invoke(parser.clj:64) at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java.parser$source_info.invokeStatic(parser.clj:299) at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java.parser$source_info.invoke(parser.clj:290) at clojure.lang.Var.invoke(Var.java:384) at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java$class_info_STAR_.invokeStatic(java.clj:196) at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java$class_info_STAR_.invoke(java.clj:187) at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java$class_info.invokeStatic(java.clj:234) at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java$class_info.invoke(java.clj:226) at cider.nrepl.inlined_deps.orchard.v0v5v5.orchard.java$eval3592$fn__3593.invoke(java.clj:376) at clojure.core$binding_conveyor_fn$fn__5754.invoke(core.clj:2030) at clojure.lang.AFn.call(AFn.java:18) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:832)
codebut that’s how I always start VSCode, and I still get these errors. The weird thing is that even though I get errors, everything still seems to work - I can still execute code and see results within my editor windows. I’ve tested against a brand-new project created with
lein newand still see the same problem, so I don’t think it’s anything weird about my project. Suggestions gratefully received (thanks in advance).
What's your OS, lein version, and java version? I haven't seem this before, that I remember. It seems to be something related to Java though, system-specific.
% uname -v Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 % lein --version OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release. Leiningen 2.9.4 on Java 15 OpenJDK 64-Bit Server VM % java -version openjdk version "15" 2020-09-15 OpenJDK Runtime Environment AdoptOpenJDK (build 15+36) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 15+36, mixed mode, sharing)
Thanks. I don't think I've used an open jdk version that high before. I wonder if that has something to do with it, and maybe in relation to the orchard library which seems to be throwing an error in some parse function (part of cider-nrepl which jack-in injects as a dependency)
Oh, seems this is a known issue: https://github.com/clojure-emacs/orchard/issues/100
For now, if you want to stop seeing those errors, you could downgrade your JDK version. I think 11 should work fine. I'm not sure about the others.