lsp

2026-05-30T15:23:46.032859Z

Suppose I want to write a custom linter that uses an existing tool. Would pods be a valid way to interact with the external tool?

ericdallo 2026-05-30T15:51:36.226319Z

Hum, I believe @andreribeirocamargo did something similar, but I think you can just spawn a shell from Clojure normally

2026-05-30T15:57:26.853029Z

Does that work from within the sci sandbox that clojure-lsp linters run in?

ericdallo 2026-05-30T17:49:35.765309Z

I believe so, even being sci/interpreted it should be able to spawn shell process, @borkdude can confirm that

borkdude 2026-05-30T17:56:53.573289Z

no limitations if you provide SCI with the right namespaces / functions

👍 1
ericdallo 2026-05-30T17:58:21.259619Z

Found it: https://github.com/clojure-lsp/clojure-lsp/pull/2075 You could do the same

👀 1
2026-05-30T18:02:25.234259Z

cool. i guess this requires maintaining a local fork of clojure-lsp. is this what most people do?

ericdallo 2026-05-30T18:05:51.813219Z

No, we can go and merge that PR, I was waiting @andreribeirocamargo finish and mark as ready

borkdude 2026-05-30T18:06:26.693589Z

You can just copy the config for babashka.process from babashka itself if you want

👍 1
2026-05-30T18:06:29.540539Z

wow. ok. i wasn't sure if there were security implications

borkdude 2026-05-30T18:06:30.540649Z

or other libs too

borkdude 2026-05-30T18:07:22.806869Z

that's a good point. in clj-kondo I try to maintain that hooks should not be able to do everything

ericdallo 2026-05-30T18:08:17.489449Z

The custom linters are opted-in for users, so it's not an automatic thing, so I'm ok with that

👍 2
2026-05-30T18:10:04.848949Z

I could be locked/down customized with a policy config if needed.

ericdallo 2026-05-30T18:10:33.572109Z

Yeah, in the end the custom linters happens in your side as well, you code it, so you can control how you want

ericdallo 2026-05-30T18:10:56.232059Z

That PR is old and has conflicts, feel free to open a new one with those changes if you want

👍 1
2026-05-30T18:12:58.126919Z

I sort of prefer babashka.process. Do you have a preference vs clojure.java.shell?

2026-05-30T18:13:07.445249Z

maybe both?

borkdude 2026-05-30T18:14:34.221179Z

(here's the config for process: https://github.com/babashka/babashka/blob/master/src/babashka/impl/process.clj)

🙏 1
ericdallo 2026-05-30T18:16:07.470479Z

I prefer bb as well, since this runs in sci and we have it in Clojure-lsp, I'm ok adding bb process

👍 1