Fork me on GitHub
#calva
<
2022-01-29
>
ericdallo18:01:25

I noticed calva always enable the output channel "Clojure Language Client" which show the json communication between Calva <-> clojure-lsp, at least for emacs, this is disabled by default for performance reasons, do you know if this could be affecting performance or vscode handles that well and we don t need to worry?

👍 1
ericdallo18:01:16

Usually this channell becomes huge since the LSP communication happens all the time

bringe19:01:32

This channel is disabled by default

bringe19:01:59

At least it was in the past, and it should be now..

bringe19:01:01

I’ll double check

ericdallo19:01:05

oh, so probably I enabled for me and was not remembering 😂

ericdallo19:01:09

yeah, I change it to trace the Clojure > trace: server

bringe19:01:18

Ah, no worries!

pez20:01:51

That de-escalated quickly! 😂

😅 1
Kurt Harriger18:01:22

for some reason my repl history no longer seems to work Option Up, Option Down also tried invoking Calva: Show Previous Repl History Entry via command palette to verify binding ins’t blocked overridden or something (as I was experimenting with vim mode again, but disabling vim and trying again still doesn’t work)

pez18:01:50

We have a fix for that. I should release, but it'll have to wait until tomorrow.

Kurt Harriger19:01:40

ah nice! thanks I was thinking it was something I broke

mindbender23:01:21

I'm getting the error message SubstrateSegfaultHandler caught a segfault in thread 0x00007efdfc000b80. Attached is part of the screenshot. I'm using graalvm OpenJDK Runtime Environment GraalVM CE 21.2.0 (build 11.0.12+6-jvmci-21.2-b08)

mindbender23:01:01

@UKFSJSM38 and this is causing clojure-lsp to go on a loop looking for the cache and analysing external class-path continuously

ericdallo23:01:40

not sure I understood how you got clojure-lsp installed, did you manually compiled clojure-lsp with graalvm?

mindbender22:01:00

No I think clojure-lsp was installed by Calva the usual way but I have graalvm on path as providing java, hence my mention of graalvm. Funny thing too is that this is just happening in one instance of vscode workspace so I don't know what may have gone wrong and it only started recently

ericdallo22:01:03

clojure-lsp download de calva is a native binary compiled with GraalVM but you don't need anything else to run it, there is nothing related with the GraalVM you have it. @U9A1RLFNV could you confirm calva always download the native binaries, right? AFAIK Calva doesn't download the jar or embedded jar ones

ericdallo22:01:14

@U0HJYDTP1 could you run calva command clojure-lsp server info and paste output here?

mindbender23:01:59

I get this error message when I run the server info command in the affected workspace:

mindbender23:01:43

But from another workspace where it runs fine I get the following output:

Clojure-lsp server info:
{
  "client-settings": {
    "auto-add-ns-to-new-files?": true,
    "cljfmt": {
      "indents": {}
    },
    "document-formatting?": false,
    "dependency-scheme": "jar",
    "keep-require-at-start?": true,
    "document-range-formatting?": false,
    "cljfmt-config-path": ".cljfmt.edn"
  },
  "project-root-uri": "file:///~/projects/b/backend/backend_clj",
  "clj-kondo-version": "2022.01.15",
  "final-settings": {
    "auto-add-ns-to-new-files?": true,
    "cljfmt": {
      "indents": {}
    },
    "document-formatting?": false,
    "dependency-scheme": "jar",
    "keep-require-at-start?": true,
    "source-paths": [
      "~/projects/b/backend/backend_clj/src",
      "~/projects/b/backend/backend_clj/test"
    ],
    "project-specs": [
      {
        "project-path": "project.clj",
        "classpath-cmd": [
          "lein",
          "classpath"
        ]
      },
      {
        "project-path": "deps.edn",
        "classpath-cmd": [
          "clojure",
          "-A:dev:test",
          "-Spath"
        ]
      },
      {
        "project-path": "build.boot",
        "classpath-cmd": [
          "boot",
          "show",
          "--fake-classpath"
        ]
      },
      {
        "project-path": "shadow-cljs.edn",
        "classpath-cmd": [
          "npx",
          "shadow-cljs",
          "classpath"
        ]
      },
      {
        "project-path": "bb.edn",
        "classpath-cmd": [
          "bb",
          "print-deps",
          "--format",
          "classpath"
        ]
      }
    ],
    "source-aliases": [
      {},
      {}
    ],
    "uri-format": {
      "upper-case-drive-letter?": false,
      "encode-colons-in-path?": false
    },
    "document-range-formatting?": false,
    "cljfmt-config-path": ".cljfmt.edn"
  },
  "port": "NREPL only available on :debug profile (`make debug-cli`)",
  "server-version": "2022.01.22-01.31.09",
  "log-path": "/tmp/clojure-lsp.680235627313186739.out",
  "project-settings": {}
}

ericdallo23:01:05

Looks correct, is by any chance your project that doesn't public so I can test it?

ericdallo23:01:29

If not could you create a simple repro repo similar to the one that doesn't work until repro the issue?

mindbender23:01:15

I have copied out deps.edn, .clj-kondo and .lsp files into a new repro folder but can't repro the situation. I also tried deleting the .cpcache in actual project still getting the error. I don't know if the error could be coming from the project source files which I doubt. Project is actually a Fulcro project. I'm wondering if it could be that the analysis is running out of memory?

ericdallo00:01:13

Hum, hard to tell, never saw that issue with GraalVM binary

bringe01:01:43

@UKFSJSM38 I believe Calva only downloads the binaries.

function getZipFileName(platform: string): string {
    return {
        'darwin': 'clojure-lsp-native-macos-amd64.zip',
        'linux': 'clojure-lsp-native-linux-amd64.zip',
        'win32': 'clojure-lsp-native-windows-amd64.zip'
    }[platform];
}

mindbender05:01:45

So I finally managed to get out of the loop by using the inspiration from the repro idea to delete the .clj-kondo and .lsp folders from main project folder and now Clojure-lsp Server Info commands returns an output. But I noticed that the classpath vector has duplicated entries for all items. That doesn't happen in the repro folder

mindbender05:01:12

Here is what it returned for classpath, some entries are elided:

"classpath": [
    "src/test",
    "src/dev",
    "src/workspaces",
    "src/samples",
    "test",
    "src/test/clojure",
    "src/main",
    "resources",
    "~/.m2/repository/bidi/bidi/2.1.6/bidi-2.1.6.jar",
    "~/.m2/repository/binaryage/devtools/1.0.4/devtools-1.0.4.jar",
    "~/.m2/repository/com/fulcrologic/fulcro/3.5.13/fulcro-3.5.13.jar",
    "~/.m2/repository/com/fulcrologic/fulcro-garden-css/3.0.9/fulcro-garden-css-3.0.9.jar",
    "~/.m2/repository/com/fulcrologic/guardrails/1.1.10/guardrails-1.1.10.jar",
    "~/.m2/repository/com/fulcrologic/semantic-ui-wrapper/1.0.1/semantic-ui-wrapper-1.0.1.jar",
    "~/.m2/repository/com/github/awkay/workspaces/1.0.3/workspaces-1.0.3.jar",
    "~/.m2/repository/com/taoensso/timbre/5.1.2/timbre-5.1.2.jar",
    "~/.m2/repository/com/wsscode/pathom3/2022.01.28-alpha/pathom3-2022.01.28-alpha.jar",
    "~/.m2/repository/datascript/datascript/0.18.7/datascript-0.18.7.jar",
    "~/.m2/repository/fulcrologic/fulcro-spec/3.1.12/fulcro-spec-3.1.12.jar",
    "~/.m2/repository/garden/garden/1.3.10/garden-1.3.10.jar",
    "~/.m2/repository/hiccup/hiccup/1.0.5/hiccup-1.0.5.jar",
    "~/.m2/repository/http-kit/http-kit/2.5.3/http-kit-2.5.3.jar",
    "~/.m2/repository/mount/mount/0.1.16/mount-0.1.16.jar",
    "~/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar",
    "~/.m2/repository/org/clojure/clojurescript/1.10.896/clojurescript-1.10.896.jar",
    "~/.m2/repository/org/clojure/core.async/1.3.618/core.async-1.3.618.jar",
    "~/.m2/repository/org/clojure/test.check/1.1.1/test.check-1.1.1.jar",
    "~/.m2/repository/org/clojure/tools.namespace/1.0.0/tools.namespace-1.0.0.jar",
    "~/.m2/repository/ring/ring-core/1.8.1/ring-core-1.8.1.jar",
    "~/.m2/repository/ring/ring-defaults/0.3.2/ring-defaults-0.3.2.jar",
    "~/.m2/repository/thheller/shadow-cljs/2.16.12/shadow-cljs-2.16.12.jar",
    "~/.m2/repository/prismatic/schema/1.1.7/schema-1.1.7.jar",
    "~/.m2/repository/com/cognitect/transit-clj/1.0.324/transit-clj-1.0.324.jar",
    "~/.m2/repository/com/taoensso/sente/1.16.1/sente-1.16.1.jar",
    "~/.m2/repository/cljsjs/highlight/9.12.0-2/highlight-9.12.0-2.jar",
    "~/.m2/repository/cljsjs/react-grid-layout/0.16.6-0/react-grid-layout-0.16.6-0.jar",
    "~/.m2/repository/com/wsscode/fuzzy/1.0.0/fuzzy-1.0.0.jar",
    "~/.m2/repository/com/taoensso/encore/3.12.1/encore-3.12.1.jar",
    "~/.m2/repository/io/aviso/pretty/0.1.37/pretty-0.1.37.jar",
    "~/.m2/repository/com/cognitect/transit-cljs/0.8.269/transit-cljs-0.8.269.jar",
    "~/.m2/repository/com/wsscode/cljc-misc/2021.10.16/cljc-misc-2021.10.16.jar",
    "~/.m2/repository/edn-query-language/eql/2021.02.28/eql-2021.02.28.jar",
    "~/.m2/repository/funcool/promesa/6.0.2/promesa-6.0.2.jar",
    "~/.m2/repository/potemkin/potemkin/0.4.5/potemkin-0.4.5.jar",
    "~/.m2/repository/persistent-sorted-set/persistent-sorted-set/0.1.2/persistent-sorted-set-0.1.2.jar",
    "~/.m2/repository/colorize/colorize/0.1.1/colorize-0.1.1.jar",
    "~/.m2/repository/com/lucasbradstreet/cljs-uuid-utils/1.0.2/cljs-uuid-utils-1.0.2.jar",
    "~/.m2/repository/com/yahoo/platform/yui/yuicompressor/2.4.8/yuicompressor-2.4.8.jar",
    "~/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar",
    "~/.m2/repository/org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar",
    "~/.m2/repository/org/clojure/google-closure-library/0.0-20211011-0726fdeb/google-closure-library-0.0-20211011-0726fdeb.jar",
    "~/.m2/repository/org/clojure/tools.analyzer.jvm/1.1.0/tools.analyzer.jvm-1.1.0.jar",
    "~/.m2/repository/org/clojure/java.classpath/1.0.0/java.classpath-1.0.0.jar",
    "~/.m2/repository/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar",
    "~/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar",
    "~/.m2/repository/crypto-equality/crypto-equality/1.0.0/crypto-equality-1.0.0.jar",
    "~/.m2/repository/crypto-random/crypto-random/1.2.0/crypto-random-1.2.0.jar",
    "~/.m2/repository/ring/ring-codec/1.1.2/ring-codec-1.1.2.jar",
    "~/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar",
    "~/.m2/repository/ring/ring-anti-forgery/1.3.0/ring-anti-forgery-1.3.0.jar",
    "~/.m2/repository/ring/ring-headers/0.3.0/ring-headers-0.3.0.jar",
    "~/.m2/repository/ring/ring-ssl/0.3.0/ring-ssl-0.3.0.jar",
    "~/.m2/repository/cider/piggieback/0.5.2/piggieback-0.5.2.jar",
    "~/.m2/repository/com/bhauman/cljs-test-display/0.1.1/cljs-test-display-0.1.1.jar",
    "~/.m2/repository/com/google/javascript/closure-compiler-unshaded/v20211006/closure-compiler-unshaded-v20211006.jar",
    "~/.m2/repository/com/wsscode/pathom/2.2.31/pathom-2.2.31.jar",
    "~/.m2/repository/expound/expound/0.8.9/expound-0.8.9.jar",
    "~/.m2/repository/fipp/fipp/0.6.24/fipp-0.6.24.jar",
    "~/.m2/repository/io/methvin/directory-watcher/0.15.0/directory-watcher-0.15.0.jar",
    "~/.m2/repository/nrepl/nrepl/0.8.3/nrepl-0.8.3.jar",
    ....
    "src/test",
    "src/dev",
    "src/workspaces",
    "src/samples",
    "src/main",
    "resources",
    "~/.m2/repository/bidi/bidi/2.1.6/bidi-2.1.6.jar",
    "~/.m2/repository/binaryage/devtools/1.0.4/devtools-1.0.4.jar",
    "~/.m2/repository/com/fulcrologic/fulcro/3.5.13/fulcro-3.5.13.jar",
    "~/.m2/repository/com/fulcrologic/fulcro-garden-css/3.0.9/fulcro-garden-css-3.0.9.jar",
    "~/.m2/repository/com/fulcrologic/guardrails/1.1.10/guardrails-1.1.10.jar",
    "~/.m2/repository/com/fulcrologic/semantic-ui-wrapper/1.0.1/semantic-ui-wrapper-1.0.1.jar",
    "~/.m2/repository/com/github/awkay/workspaces/1.0.3/workspaces-1.0.3.jar",
    "~/.m2/repository/com/taoensso/timbre/5.1.2/timbre-5.1.2.jar",
    "~/.m2/repository/com/wsscode/pathom3/2022.01.28-alpha/pathom3-2022.01.28-alpha.jar",
    "~/.m2/repository/datascript/datascript/0.18.7/datascript-0.18.7.jar",
    "~/.m2/repository/fulcrologic/fulcro-spec/3.1.12/fulcro-spec-3.1.12.jar",
    "~/.m2/repository/garden/garden/1.3.10/garden-1.3.10.jar",
    "~/.m2/repository/hiccup/hiccup/1.0.5/hiccup-1.0.5.jar",
    "~/.m2/repository/http-kit/http-kit/2.5.3/http-kit-2.5.3.jar",
    "~/.m2/repository/mount/mount/0.1.16/mount-0.1.16.jar",
    "~/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar",
    "~/.m2/repository/org/clojure/clojurescript/1.10.896/clojurescript-1.10.896.jar",
    "~/.m2/repository/org/clojure/core.async/1.3.618/core.async-1.3.618.jar",
    "~/.m2/repository/org/clojure/tools.namespace/1.0.0/tools.namespace-1.0.0.jar",
    "~/.m2/repository/ring/ring-core/1.8.1/ring-core-1.8.1.jar",
    "~/.m2/repository/ring/ring-defaults/0.3.2/ring-defaults-0.3.2.jar",
    "~/.m2/repository/thheller/shadow-cljs/2.16.12/shadow-cljs-2.16.12.jar",
    "~/.m2/repository/prismatic/schema/1.1.7/schema-1.1.7.jar",
    "~/.m2/repository/com/cognitect/transit-clj/1.0.324/transit-clj-1.0.324.jar",
    "~/.m2/repository/com/taoensso/sente/1.16.1/sente-1.16.1.jar",
    "~/.m2/repository/cljsjs/highlight/9.12.0-2/highlight-9.12.0-2.jar",
    "~/.m2/repository/cljsjs/react-grid-layout/0.16.6-0/react-grid-layout-0.16.6-0.jar",
    "~/.m2/repository/com/wsscode/fuzzy/1.0.0/fuzzy-1.0.0.jar",
    "~/.m2/repository/com/taoensso/encore/3.12.1/encore-3.12.1.jar",
    "~/.m2/repository/io/aviso/pretty/0.1.37/pretty-0.1.37.jar",
    "~/.m2/repository/com/cognitect/transit-cljs/0.8.269/transit-cljs-0.8.269.jar",
    "~/.m2/repository/com/wsscode/cljc-misc/2021.10.16/cljc-misc-2021.10.16.jar",
    "~/.m2/repository/edn-query-language/eql/2021.02.28/eql-2021.02.28.jar",
    "~/.m2/repository/funcool/promesa/6.0.2/promesa-6.0.2.jar",
    "~/.m2/repository/potemkin/potemkin/0.4.5/potemkin-0.4.5.jar",
    "~/.m2/repository/persistent-sorted-set/persistent-sorted-set/0.1.2/persistent-sorted-set-0.1.2.jar",
    "~/.m2/repository/colorize/colorize/0.1.1/colorize-0.1.1.jar",
    "~/.m2/repository/com/lucasbradstreet/cljs-uuid-utils/1.0.2/cljs-uuid-utils-1.0.2.jar",
    "~/.m2/repository/com/yahoo/platform/yui/yuicompressor/2.4.8/yuicompressor-2.4.8.jar",
    "~/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar",
    "~/.m2/repository/org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar",
    "~/.m2/repository/org/clojure/google-closure-library/0.0-20211011-0726fdeb/google-closure-library-0.0-20211011-0726fdeb.jar",
    "~/.m2/repository/org/clojure/tools.analyzer.jvm/1.1.0/tools.analyzer.jvm-1.1.0.jar",
    "~/.m2/repository/org/clojure/java.classpath/1.0.0/java.classpath-1.0.0.jar",
    "~/.m2/repository/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar",
    "~/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar",
    "~/.m2/repository/crypto-equality/crypto-equality/1.0.0/crypto-equality-1.0.0.jar",
    "~/.m2/repository/crypto-random/crypto-random/1.2.0/crypto-random-1.2.0.jar",
    "~/.m2/repository/ring/ring-codec/1.1.2/ring-codec-1.1.2.jar",
    "~/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar",
    "~/.m2/repository/ring/ring-anti-forgery/1.3.0/ring-anti-forgery-1.3.0.jar",
    "~/.m2/repository/ring/ring-headers/0.3.0/ring-headers-0.3.0.jar",
    "~/.m2/repository/ring/ring-ssl/0.3.0/ring-ssl-0.3.0.jar",
    "~/.m2/repository/cider/piggieback/0.5.2/piggieback-0.5.2.jar",
    "~/.m2/repository/com/bhauman/cljs-test-display/0.1.1/cljs-test-display-0.1.1.jar",
    "~/.m2/repository/com/google/javascript/closure-compiler-unshaded/v20211006/closure-compiler-unshaded-v20211006.jar",
    "~/.m2/repository/com/wsscode/pathom/2.2.31/pathom-2.2.31.jar",
    "~/.m2/repository/expound/expound/0.8.9/expound-0.8.9.jar",
    "~/.m2/repository/fipp/fipp/0.6.24/fipp-0.6.24.jar",
    "~/.m2/repository/io/methvin/directory-watcher/0.15.0/directory-watcher-0.15.0.jar",
    "~/.m2/repository/nrepl/nrepl/0.8.3/nrepl-0.8.3.jar",
    .... 
  ] 

ericdallo12:01:08

There is no issue on the duplicates since we do a set when using, I think your issue was related with some kind of corrupted lsp cache, I hope this will not happen anymore on next release since we are now using transit instead of datalevin