lsp

seancorfield 2025-05-16T03:54:04.419339Z

This used to work:

:sort-ns
  {:replace-paths ["development/src"]
   :replace-deps {com.github.clojure-lsp/clojure-lsp {:mvn/version "RELEASE"}}
   :exec-fn ws.lsp/clean-ns!
   :exec-args {}}
but now when I run clojure -T:sort-ns I get this error:
Execution error (FileNotFoundException) at clojure-lsp.refactor.edit/eval15230$loading (edit.clj:1).
Could not locate rewrite_clj/node__init.class, rewrite_clj/node.clj or rewrite_clj/node.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.

seancorfield 2025-05-19T14:05:37.599859Z

Now that rewrite-clj has a release, will LSP get a new release?

ericdallo 2025-05-19T14:06:18.566429Z

Already pushed to master this bump

ericdallo 2025-05-19T14:06:39.751479Z

I'm working on some new features for clojure-lsp that I intend to merge this week, then I'll do a new release

๐Ÿ‘๐Ÿป 1
ericdallo 2025-05-16T12:21:08.900059Z

are you using latest version? Looks like some dependency issue, since rewrite-clj is pretty used in clojure-lsp, maybe checking the deps tree?

seancorfield 2025-05-16T13:51:12.859639Z

Well, I ran clojure -Sforce -T:sort-ns to make sure it was picking up the RELEASE but I can try an explicit version number there...

seancorfield 2025-05-16T13:53:35.623269Z

Deleted clojure-lsp artifacts from ~/.m2 and still get it:

> clojure -Sforce -T:sort-ns
Downloading: org/clojure/clojure/maven-metadata.xml from central
Downloading: org/clojure/clojure/maven-metadata.xml from sonatype
Downloading: com/github/clojure-lsp/clojure-lsp/maven-metadata.xml from clojars
Downloading: com/github/clojure-lsp/clojure-lsp/2025.04.23-18.16.46/clojure-lsp-2025.04.23-18.16.46.pom from clojars
Downloading: com/github/clojure-lsp/lsp4clj/1.11.0/lsp4clj-1.11.0.pom from clojars
Downloading: com/github/clojure-lsp/lsp4clj/1.11.0/lsp4clj-1.11.0.jar from clojars
Downloading: com/github/clojure-lsp/clojure-lsp/2025.04.23-18.16.46/clojure-lsp-2025.04.23-18.16.46.jar from clojars
Execution error (FileNotFoundException) at clojure-lsp.refactor.edit/eval15230$loading (edit.clj:1).
Could not locate rewrite_clj/node__init.class, rewrite_clj/node.clj or rewrite_clj/node.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.

seancorfield 2025-05-16T13:53:58.659659Z

That's definitely downloading the latest version.

ericdallo 2025-05-16T13:55:27.624399Z

Hum, I wonder if it's related with clojure-lsp using git sha for rewrite-clj

seancorfield 2025-05-16T14:00:52.843259Z

Oh, you can't use git deps in JAR files (with pom.xml)

ericdallo 2025-05-16T14:01:16.873899Z

hum, that sucks

ericdallo 2025-05-16T14:02:22.055669Z

I think we will need to wait for rewrite-clj release, @lee do you see any problems releasing the paredit improvements you did? it's been a while and it's working good on clojure-lsp so far, I don't mind being a beta release as well ๐Ÿ˜…

seancorfield 2025-05-16T14:02:41.972949Z

I could always use a git dep for clojure-lsp itself ๐Ÿ™‚

seancorfield 2025-05-16T14:05:04.635129Z

Apparently, that's not sufficient...

clojure -Sforce -T:sort-ns
Checking out:  at 454c86a60336bd076e066c9bb6fb85fac2cec830
Execution error (FileNotFoundException) at ws.lsp/clean-ns! (lsp.clj:19).
Could not locate clojure_lsp/api__init.class, clojure_lsp/api.clj or clojure_lsp/api.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.

seancorfield 2025-05-16T14:06:29.196469Z

Do I need a different artifact?

ericdallo 2025-05-16T14:07:15.122859Z

ah yes, clojure-lsp is a mono-repo, there are the lib and cli modules, probably only cli is enough for you

ericdallo 2025-05-16T14:07:46.005439Z

so not sure that works, never tried

seancorfield 2025-05-16T14:12:21.280919Z

This works just fine:

:sort-ns
  {:replace-paths ["development/src"]
   :replace-deps {com.github.clojure-lsp/clojure-lsp
                  {:git/tag "2025.04.23-18.16.46"
                   :git/sha "454c86a"
                   :deps/root "cli"}
                  #_{:mvn/version "RELEASE"}}
   :exec-fn ws.lsp/clean-ns!
   :exec-args {}}
Thank you!

๐Ÿ‘ 1
seancorfield 2025-05-16T14:13:13.842659Z

Cleaned 140 namespaces -- oh, this is going to be a big PR ๐Ÿ™‚

๐Ÿ˜… 2
seancorfield 2025-05-16T14:15:41.525569Z

I'm migrating from clojure.tools.logging to org.corfield.logging4j2 so all my nses are out of order after the global find'n'replace ๐Ÿ™‚

seancorfield 2025-05-16T14:56:21.603269Z

(halfway through reviewing the changes -- some of these nses haven't been touched since 2019!)

๐Ÿงน 2
lread 2025-05-16T15:20:08.445689Z

Hey ho! Glad Sean has a workaround, but yeah, it has been a while, huh? I can mark rewrite-clj paredit namespace as "experimental and subject to change" and cut a release sometime today or tomorrow.

2