This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-03
Channels
- # ai (1)
- # announcements (1)
- # beginners (5)
- # biff (23)
- # clojure (3)
- # clojure-europe (4)
- # clojure-norway (22)
- # clojurescript (21)
- # data-science (1)
- # datascript (5)
- # graalvm (2)
- # gratitude (2)
- # humbleui (4)
- # hyperfiddle (10)
- # lsp (46)
- # off-topic (15)
- # pedestal (1)
- # reitit (3)
- # shadow-cljs (12)
- # sql (4)
Any macos user willing to test a clojure-lsp-intellij
plugin change? I made some big refactors that may fix 3 major bugs that happens on macos only :)
Just install the zip from https://github.com/clojure-lsp/clojure-lsp-intellij/pull/34
it should fix: https://github.com/clojure-lsp/clojure-lsp-intellij/issues/25 https://github.com/clojure-lsp/clojure-lsp-intellij/issues/26 https://github.com/clojure-lsp/clojure-lsp-intellij/issues/29
I'm trying to get the refactoring mappings working in nvim using fennel for config. I don't understand why the LSP log is telling me that the form cannot be found at the given position. Any ideas?
hum, weird, this happens https://github.com/clojure-lsp/clojure-lsp/blob/56262f6d35e1dea0b468f1d19ab0c31fefcd54aa/lib/src/clojure_lsp/feature/refactor.clj#L204, when we can't pase the zloc or it's a clean-ns refactoring
You mean off-by-one? I tried shifting the hardcoded row/col numbers: > Could not find a form at this location. row 0 col 0 file /tmp/lspdebug/foo.cl
the loc happens https://github.com/clojure-lsp/clojure-lsp/blob/56262f6d35e1dea0b468f1d19ab0c31fefcd54aa/lib/src/clojure_lsp/handlers.clj#L396, maybe add a log there and test local?
When I use the actions menu and select TFA, it does work correctly. Is there a way to see exactly what arguments its getting there?
you can clone clojure-lsp and run bb debug-cli
and it should generate a local clojure-lsp
binary so you could test
you could debug client <-> https://clojure-lsp.io/troubleshooting/#client-server-log, BTW we need to add how to do that for vim in that docs, I have no idea
Hmm, bb debug-cli
failed:
Location: /tmp/clojure-lsp/scripts/make.clj:54:7
----- Context ------------------------------------------------------------------
50: (fs/delete-tree f))))
51:
52: (defn ^:private clj! [dir cmd]
53: (-> (deps/clojure cmd {:dir dir, :inherit true})
54: (p/check)))
^---
55:
56: (defn ^:private build [dir tool] (clj! dir ["-T:build" tool]))
57:
58: (defn ^:private unit-test [dir]
59: (println :running-unit-tests... dir)
----- Stack trace --------------------------------------------------------------
babashka.process/check - <built-in>
make/clj! - /tmp/clojure-lsp/scripts/make.clj:54:7
make/clj! - /tmp/clojure-lsp/scripts/make.clj:52:1
make/build - /tmp/clojure-lsp/scripts/make.clj:56:34
make/build - /tmp/clojure-lsp/scripts/make.clj:56:1
make - /tmp/clojure-lsp/scripts/make.clj:101:3
clojure.core/apply - <built-in>
user-92dcb728-0766-4497-84dc-39c53d8d7e9b - <expr>:28:1
Is there some intermediate step that should be done between cloning and running that command?hum, not really, do you have clojure
installed? is there anything more in that stack before that?
$ clojure --version
Clojure CLI version 1.11.1.1435
Yes, there's quite a bit in the stack. You want the whole thing?Syntax error (ClassNotFoundException) compiling at (clojure_lsp/main.clj:1:1). clojure-lsp.main
:thinking_face:
$ clojure -Spath
/home/alex/.m2/repository/org/clojure/clojure/1.11.1/clojure-1.11.1.jar:/home/alex/.m2/repository/org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar:/home/alex/.m2/repository/org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar
$ java --version
openjdk 21.0.2 2024-01-16 LTS
OpenJDK Runtime Environment Temurin-21.0.2+13 (build 21.0.2+13-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.2+13 (build 21.0.2+13-LTS, mixed mode, sharing)
hum, didn't test clojure-lsp with java 21, only 17 and below, maybe it's related?
@UKFSJSM38 exactly which java 17 version?
I don't think it would be relevant but mine is:
openjdk 17.0.7 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-nixos)
OpenJDK 64-Bit Server VM (build 17.0.7+7-nixos, mixed mode, sharing)
Alright, I used asdf to install:
$ java --version
openjdk 17.0.2 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)
and I'm still getting the same result.I think that's all I'm going to try today. Thanks for your help. I'll take another shot at it sometime.
@UKFSJSM38 I managed to get a debug-cli build working by nuking my .m2 :man-shrugging:
When I inspect what happens in call-refactor
I see
{:loc nil, :uri "/tmp/lspdebug/foo.clj", :refactoring :cycle-coll, :row 3, :col 2, :version 0}
We need to understand why loc is being nil, try adding somes logger/info in the link I sent you