Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go to Definition not working on Windows #1807

Closed
crimsonhawk47 opened this issue Jul 23, 2022 · 7 comments
Closed

Go to Definition not working on Windows #1807

crimsonhawk47 opened this issue Jul 23, 2022 · 7 comments
Labels

Comments

@crimsonhawk47
Copy link

crimsonhawk47 commented Jul 23, 2022

I'm running the latest version of calva and clojure-lsp. Go to definition is not working correctly with any of the dependencies.

It will go to different files for functions I've defined, but nothing in the jar files.

The jar files are in the classpath. They are in the .m2 repository, installed with leiningen

There are no errors in the clojure-lsp log. Here is the interaction between the language server and Calva when I try to do this:

  [Trace - 7:28:23 PM] Sending request 'textDocument/definition - (50)'.
  Params: {
      "textDocument": {
          "uri": "file:///c%3A/Users/{path_to_app}/routes/home.clj"
      },
      "position": {
          "line": 6,
          "character": 22
      }
  }
[Trace - 7:28:23 PM] Received response 'textDocument/definition - (50)' in 10ms.
No result returned.
@bpringe
Copy link
Member

bpringe commented Jul 24, 2022

Hi. How are you opening your project? Are you opening it from the root of the project (is there a project.clj file at the top level)?

Are you able to reproduce this with a new small project, maybe generated from a lein template?

@bpringe bpringe added the lsp label Jul 24, 2022
@crimsonhawk47
Copy link
Author

crimsonhawk47 commented Jul 24, 2022

Yes, this is happening on a lein new luminus template. I'm opening it code from the command line and there is a project.clj in the root.

If I were to run the project in WSL and install calva through there, it works (albeit a little slowly).

In windows, I did have to change .lsp/config.edn because calva runs all the commands with pwsh by default. Powershell is just powershell on my system. But the settings are basically the same with that change. Here is the config.edn.

{:project-specs [{:project-path "project.clj"
                  :classpath-cmd ["powershell",
                                  "-NoProfile",
                                  "-Command",
                                  "lein",
                                  "with-profile",
                                  "+test,+dev",
                                  "classpath"]}
                 {:project-path "deps.edn"
                  :classpath-cmd ["powershell",
                                  "-NoProfile",
                                  "-Command",
                                  "clojure",
                                  "-A:test:dev",
                                  "-Spath"]}
                 {:project-path "build.boot"
                  :classpath-cmd ["powershell",
                                  "-NoProfile",
                                  "-Command",
                                  "boot",
                                  "show",
                                  "--fake-classpath"]}
                 {:project-path "shadow-cljs.edn"
                  :classpath-cmd ["powershell",
                                  "-NoProfile",
                                  "-Command",
                                  "npx",
                                  "shadow-cljs",
                                  "classpath"]}
                 {:project-path "bb.edn"
                  :classpath-cmd ["powershell",
                                  "-NoProfile",
                                  "-Command",
                                  "bb",
                                  "print-deps",
                                  "--format",
                                  "classpath"]}]}

Here is my server info

Clojure-lsp server info:
{
  "client-settings": {
    "auto-add-ns-to-new-files?": true,
    "document-formatting?": false,
    "dependency-scheme": "jar",
    "keep-require-at-start?": true,
    "linters": {},
    "document-range-formatting?": false,
    "cljfmt-config-path": ".cljfmt.edn"
  },
  "project-root-uri": "file:///c%3A/Users/{path_to_project}/something-test",
  "cljfmt-raw": "nil",
  "clj-kondo-version": "2022.06.22",
  "final-settings": {
    "auto-add-ns-to-new-files?": true,
    "document-formatting?": false,
    "dependency-scheme": "jar",
    "keep-require-at-start?": true,
    "source-paths": [
      "C:\\Users\\{path_to_project}\\something-test\\test\\clj",
      "C:\\Users\\{path_to_project}\\something-test\\src\\clj",
      "C:\\Users\\{path_to_project}\\something-test\\env\\test\\resources",
      "C:\\Users\\{path_to_project}\\something-test\\env\\dev\\clj",
      "C:\\Users\\{path_to_project}\\something-test\\dev-resources",
      "C:\\Users\\{path_to_project}\\something-test\\env\\dev\\resources"
    ],
    "project-specs": [
      {
        "project-path": "project.clj",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "lein",
          "with-profile",
          "+test,+dev",
          "classpath"
        ]
      },
      {
        "project-path": "deps.edn",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "clojure",
          "-A:test:dev",
          "-Spath"
        ]
      },
      {
        "project-path": "build.boot",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "boot",
          "show",
          "--fake-classpath"
        ]
      },
      {
        "project-path": "shadow-cljs.edn",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "npx",
          "shadow-cljs",
          "classpath"
        ]
      },
      {
        "project-path": "bb.edn",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "bb",
          "print-deps",
          "--format",
          "classpath"
        ]
      },
      {
        "project-path": "project.clj",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "lein",
          "with-profile",
          "+test,+dev",
          "classpath"
        ]
      },
      {
        "project-path": "deps.edn",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "clojure",
          "-A:test:dev",
          "-Spath"
        ]
      },
      {
        "project-path": "build.boot",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "boot",
          "show",
          "--fake-classpath"
        ]
      },
      {
        "project-path": "shadow-cljs.edn",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "npx",
          "shadow-cljs",
          "classpath"
        ]
      },
      {
        "project-path": "bb.edn",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "bb",
          "print-deps",
          "--format",
          "classpath"
        ]
      }
    ],
    "linters": {},
    "source-aliases": [
      "dev",
      "test"
    ],
    "uri-format": {
      "upper-case-drive-letter?": false,
      "encode-colons-in-path?": true
    },
    "document-range-formatting?": false,
    "cljfmt-config-path": ".cljfmt.edn"
  },
  "classpath": [
    "C:\\Users\\{user_name}\\.m2\\repository\\expiring-map\\expiring-map\\0.1.9\\expiring-map-0.1.9.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\expound\\expound\\0.9.0\\expound-0.9.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\google\\code\\findbugs\\jsr305\\3.0.1\\jsr305-3.0.1.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\commons-io\\commons-io\\2.10.0\\commons-io-2.10.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\ring\\ring-defaults\\0.3.3\\ring-defaults-0.3.3.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\googlecode\\json-simple\\json-simple\\1.1.1\\json-simple-1.1.1.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\fipp\\fipp\\0.6.24\\fipp-0.6.24.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\tech\\droit\\clj-diff\\1.0.1\\clj-diff-1.0.1.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\ring\\ring-devel\\1.9.5\\ring-devel-1.9.5.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\google\\javascript\\closure-compiler-unshaded\\v20180805\\closure-compiler-unshaded-v20180805.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\io\\undertow\\undertow-core\\2.2.14.Final\\undertow-core-2.2.14.Final.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\nrepl\\nrepl\\0.9.0\\nrepl-0.9.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\fasterxml\\jackson\\datatype\\jackson-datatype-jsr310\\2.12.0\\jackson-datatype-jsr310-2.12.0.jar",
    "C:\\Users\\{path_to_project}\\something-test\\test\\clj",
    "C:\\Users\\{user_name}\\.m2\\repository\\ns-tracker\\ns-tracker\\0.4.0\\ns-tracker-0.4.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\yaml\\snakeyaml\\1.26\\snakeyaml-1.26.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\java.classpath\\1.0.0\\java.classpath-1.0.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\lambdaisland\\deep-diff\\0.0-47\\deep-diff-0.0-47.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit-swagger-ui\\0.5.15\\reitit-swagger-ui-0.5.15.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\fasterxml\\jackson\\core\\jackson-annotations\\2.12.4\\jackson-annotations-2.12.4.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\commons-fileupload\\commons-fileupload\\1.4\\commons-fileupload-1.4.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\ring\\ring-ssl\\0.3.0\\ring-ssl-0.3.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\net\\jodah\\expiringmap\\0.5.9\\expiringmap-0.5.9.jar",
    "C:\\Users\\{path_to_project}\\something-test\\src\\clj",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\tools.reader\\1.3.6\\tools.reader-1.3.6.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\potemkin\\potemkin\\0.4.5\\potemkin-0.4.5.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\test.check\\1.1.0\\test.check-1.1.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\slf4j\\slf4j-api\\1.7.32\\slf4j-api-1.7.32.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\clj-stacktrace\\clj-stacktrace\\0.2.8\\clj-stacktrace-0.2.8.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\fasterxml\\jackson\\core\\jackson-databind\\2.12.4\\jackson-databind-2.12.4.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\core.rrb-vector\\0.0.14\\core.rrb-vector-0.0.14.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\io\\github\\classgraph\\classgraph\\4.8.115\\classgraph-4.8.115.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\mozilla\\rhino\\1.7R5\\rhino-1.7R5.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\realize\\realize\\2019-04-24\\realize-2019-04-24.jar",
    "C:\\Users\\{path_to_project}\\something-test\\env\\test\\resources",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit-frontend\\0.5.15\\reitit-frontend-0.5.15.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\wildfly\\client\\wildfly-client-config\\1.0.1.Final\\wildfly-client-config-1.0.1.Final.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit\\0.5.15\\reitit-0.5.15.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\andrewmcveigh\\cljs-time\\0.5.2\\cljs-time-0.5.2.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\clj-commons\\clj-yaml\\0.7.107\\clj-yaml-0.7.107.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\clojure\\1.11.1\\clojure-1.11.1.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\funcool\\struct\\1.4.0\\struct-1.4.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit-schema\\0.5.15\\reitit-schema-0.5.15.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit-http\\0.5.15\\reitit-http-0.5.15.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit-malli\\0.5.15\\reitit-malli-0.5.15.jar",
    "C:\\Users\\{path_to_project}\\something-test\\env\\dev\\clj",
    "C:\\Users\\{user_name}\\.m2\\repository\\luminus\\ring-ttl-session\\0.3.3\\ring-ttl-session-0.3.3.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\msgpack\\msgpack\\0.6.12\\msgpack-0.6.12.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\selmer\\selmer\\1.12.50\\selmer-1.12.50.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\mvxcvi\\arrangement\\1.2.0\\arrangement-1.2.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\ring\\ring-headers\\0.3.0\\ring-headers-0.3.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\cider\\cider-nrepl\\0.26.0\\cider-nrepl-0.26.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\data.json\\0.2.6\\data.json-0.2.6.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\pjstadig\\humane-test-output\\0.11.0\\humane-test-output-0.11.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\tigris\\tigris\\0.1.1\\tigris-0.1.1.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\jboss\\logging\\jboss-logging\\3.4.1.Final\\jboss-logging-3.4.1.Final.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\prone\\prone\\2021-04-23\\prone-2021-04-23.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\javassist\\javassist\\3.18.1-GA\\javassist-3.18.1-GA.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\tools.logging\\1.2.4\\tools.logging-1.2.4.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\crypto-random\\crypto-random\\1.2.1\\crypto-random-1.2.1.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\markdown-clj\\markdown-clj\\1.10.8\\markdown-clj-1.10.8.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\clojurescript\\1.10.520\\clojurescript-1.10.520.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\google\\guava\\guava\\25.1-jre\\guava-25.1-jre.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\spec-tools\\0.10.5\\spec-tools-0.10.5.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\clojure\\java-time\\clojure.java-time\\0.3.3\\clojure.java-time-0.3.3.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\google-closure-library\\0.0-20170809-b9c14c6b\\google-closure-library-0.0-20170809-b9c14c6b.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\bhauman\\spell-spec\\0.1.2\\spell-spec-0.1.2.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit-core\\0.5.15\\reitit-core-0.5.15.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\tools.cli\\1.0.206\\tools.cli-1.0.206.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\webjars\\webjars-locator-jboss-vfs\\0.1.0\\webjars-locator-jboss-vfs-0.1.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\ring\\ring-anti-forgery\\1.3.0\\ring-anti-forgery-1.3.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\google\\errorprone\\error_prone_annotations\\2.0.18\\error_prone_annotations-2.0.18.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\json-html\\json-html\\0.4.7\\json-html-0.4.7.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\checkerframework\\checker-qual\\2.0.0\\checker-qual-2.0.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\wildfly\\common\\wildfly-common\\1.5.2.Final\\wildfly-common-1.5.2.Final.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit-swagger\\0.5.15\\reitit-swagger-0.5.15.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\webjars\\npm\\material-icons\\1.0.0\\material-icons-1.0.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\ch\\qos\\logback\\logback-core\\1.2.10\\logback-core-1.2.10.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\apache\\commons\\commons-lang3\\3.12.0\\commons-lang3-3.12.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\riddley\\riddley\\0.1.12\\riddley-0.1.12.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\commons-codec\\commons-codec\\1.15\\commons-codec-1.15.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\ring\\ring-core\\1.9.5\\ring-core-1.9.5.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\borkdude\\dynaload\\0.2.2\\dynaload-0.2.2.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\ring-swagger-ui\\3.46.0\\ring-swagger-ui-3.46.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\jboss\\threads\\jboss-threads\\3.1.0.Final\\jboss-threads-3.1.0.Final.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\ring-http-response\\0.9.3\\ring-http-response-0.9.3.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\spec.alpha\\0.3.218\\spec.alpha-0.3.218.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\meta-merge\\meta-merge\\1.0.0\\meta-merge-1.0.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit-spec\\0.5.15\\reitit-spec-0.5.15.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\sieppari\\0.0.0-alpha13\\sieppari-0.0.0-alpha13.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\luminus-transit\\luminus-transit\\0.1.5\\luminus-transit-0.1.5.jar",
    "C:\\Users\\{path_to_project}\\something-test\\target\\default+test+test\\classes",
    "C:\\Users\\{path_to_project}\\something-test\\resources",
    "C:\\Users\\{user_name}\\.m2\\repository\\args4j\\args4j\\2.0.26\\args4j-2.0.26.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\flatland\\ordered\\1.5.9\\ordered-1.5.9.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\google\\javascript\\closure-compiler-externs\\v20180805\\closure-compiler-externs-v20180805.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\malli\\0.5.1\\malli-0.5.1.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\google-closure-library-third-party\\0.0-20170809-b9c14c6b\\google-closure-library-third-party-0.0-20170809-b9c14c6b.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\ring\\ring-mock\\0.4.0\\ring-mock-0.4.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\ring-webjars\\ring-webjars\\0.2.0\\ring-webjars-0.2.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\cognitect\\transit-cljs\\0.8.256\\transit-cljs-0.8.256.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\cognitect\\transit-java\\0.8.337\\transit-java-0.8.337.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\cognitect\\transit-clj\\0.8.319\\transit-clj-0.8.319.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\fasterxml\\jackson\\dataformat\\jackson-dataformat-cbor\\2.9.6\\jackson-dataformat-cbor-2.9.6.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\mvxcvi\\puget\\1.1.2\\puget-1.1.2.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\javax\\servlet\\javax.servlet-api\\3.1.0\\javax.servlet-api-3.1.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\codehaus\\mojo\\animal-sniffer-annotations\\1.14\\animal-sniffer-annotations-1.14.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\hiccup\\hiccup\\1.0.5\\hiccup-1.0.5.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\jsonista\\0.3.1\\jsonista-0.3.1.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\crypto-equality\\crypto-equality\\1.0.0\\crypto-equality-1.0.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\cprop\\cprop\\0.1.19\\cprop-0.1.19.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\webjars\\npm\\bulma\\0.9.3\\bulma-0.9.3.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\javax\\xml\\bind\\jaxb-api\\2.3.0\\jaxb-api-2.3.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\webjars\\webjars-locator\\0.42\\webjars-locator-0.42.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit-sieppari\\0.5.15\\reitit-sieppari-0.5.15.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\luminus\\ring-undertow-adapter\\1.2.5\\ring-undertow-adapter-1.2.5.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit-ring\\0.5.15\\reitit-ring-0.5.15.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit-dev\\0.5.15\\reitit-dev-0.5.15.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\jboss\\xnio\\xnio-api\\3.8.4.Final\\xnio-api-3.8.4.Final.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\google\\code\\gson\\gson\\2.7\\gson-2.7.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\fasterxml\\jackson\\dataformat\\jackson-dataformat-smile\\2.9.6\\jackson-dataformat-smile-2.9.6.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\fasterxml\\jackson\\core\\jackson-core\\2.12.4\\jackson-core-2.12.4.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\nrepl\\incomplete\\0.1.0\\incomplete-0.1.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit-middleware\\0.5.15\\reitit-middleware-0.5.15.jar",
    "C:\\Users\\{path_to_project}\\something-test\\dev-resources",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\schema-tools\\0.12.3\\schema-tools-0.12.3.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\cheshire\\cheshire\\5.8.1\\cheshire-5.8.1.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\muuntaja\\0.6.8\\muuntaja-0.6.8.jar",
    "C:\\Users\\{path_to_project}\\something-test\\env\\dev\\resources",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\webjars\\webjars-locator-core\\0.48\\webjars-locator-core-0.48.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\mount\\mount\\0.1.16\\mount-0.1.16.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\ch\\qos\\logback\\logback-classic\\1.2.10\\logback-classic-1.2.10.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\core.specs.alpha\\0.2.62\\core.specs.alpha-0.2.62.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\funcool\\cuerdas\\2.2.0\\cuerdas-2.2.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\google\\protobuf\\protobuf-java\\3.0.2\\protobuf-java-3.0.2.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\jboss\\xnio\\xnio-nio\\3.8.4.Final\\xnio-nio-3.8.4.Final.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\prismatic\\schema\\1.1.12\\schema-1.1.12.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\cognitect\\transit-js\\0.8.846\\transit-js-0.8.846.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\metosin\\reitit-interceptors\\0.5.15\\reitit-interceptors-0.5.15.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\luminus-undertow\\luminus-undertow\\0.1.14\\luminus-undertow-0.1.14.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\clj-tuple\\clj-tuple\\0.2.2\\clj-tuple-0.2.2.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\ring\\ring-codec\\1.1.3\\ring-codec-1.1.3.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\google\\j2objc\\j2objc-annotations\\1.1\\j2objc-annotations-1.1.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\com\\google\\jsinterop\\jsinterop-annotations\\1.0.0\\jsinterop-annotations-1.0.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\org\\clojure\\tools.namespace\\1.2.0\\tools.namespace-1.2.0.jar",
    "C:\\Users\\{user_name}\\.m2\\repository\\borkdude\\edamame\\0.0.11\\edamame-0.0.11.jar"
  ],
  "port": "NREPL only available on :debug profile (`make debug-cli`)",
  "server-version": "2022.06.29-19.32.13",
  "log-path": "C:\\Users\\{user_name}\\AppData\\Local\\Temp\\clojure-lsp.8404149117887677897.out",
  "project-settings": {
    "project-specs": [
      {
        "project-path": "project.clj",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "lein",
          "with-profile",
          "+test,+dev",
          "classpath"
        ]
      },
      {
        "project-path": "deps.edn",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "clojure",
          "-A:test:dev",
          "-Spath"
        ]
      },
      {
        "project-path": "build.boot",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "boot",
          "show",
          "--fake-classpath"
        ]
      },
      {
        "project-path": "shadow-cljs.edn",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "npx",
          "shadow-cljs",
          "classpath"
        ]
      },
      {
        "project-path": "bb.edn",
        "classpath-cmd": [
          "powershell",
          "-NoProfile",
          "-Command",
          "bb",
          "print-deps",
          "--format",
          "classpath"
        ]
      }
    ]
  }
}

@bpringe
Copy link
Member

bpringe commented Jul 26, 2022

Thanks for the details.

In windows, I did have to change .lsp/config.edn because calva runs all the commands with pwsh by default. Powershell is just powershell on my system.

So even doing that, go to definition still doesn't work for you?

Also, that problem is being tracked upstream in clojure-lsp here and a fix is in progress. However, I think you are saying that even when the classpath lookup succeeds by you changing the config to use powershell.exe, you still have the issue, right?

I might be misunderstanding you. If go to definition does work when you use powershell.exe, then I'll mark this as upstream, and soon the issue should be fixed in clojure-lsp.

@crimsonhawk47
Copy link
Author

Thanks for the details.

In windows, I did have to change .lsp/config.edn because calva runs all the commands with pwsh by default. Powershell is just powershell on my system.

So even doing that, go to definition still doesn't work for you?

That is correct. Even when the classpath lookup works, go to definition is not working.

@bpringe
Copy link
Member

bpringe commented Aug 26, 2022

Any clue here, @ericdallo?

@ericdallo
Copy link
Contributor

@crimsonhawk47 is it possible to provide a sample clojure project where the issue happens so I can test it too?

Also, we had some issues with lsp caches in the past that should be solved now but users may have outdated cache, could you try removing the local .lsp/.cache and global cache ~/.cache/clojure-lsp (not sure where this is stored on windows, but this is the code)

@crimsonhawk47
Copy link
Author

@crimsonhawk47 is it possible to provide a sample clojure project where the issue happens so I can test it too?

Also, we had some issues with lsp caches in the past that should be solved now but users may have outdated cache, could you try removing the local .lsp/.cache and global cache ~/.cache/clojure-lsp (not sure where this is stored on windows, but this is the code)

I'm not sure which cache was the problem, but that fixed it for now. Every once in a while I install something and its not recognized, so I need to delete the cache again. I'm going to close this for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants