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

Consider making clj-kondo version dynamic #1

Open
vincentjames501 opened this issue May 22, 2023 · 1 comment
Open

Consider making clj-kondo version dynamic #1

vincentjames501 opened this issue May 22, 2023 · 1 comment

Comments

@vincentjames501
Copy link

I think it would be cool if we could make this line dynamic:

https://github.com/clj-kondo/clj-kondo-bb/blob/main/src/clj_kondo/core.bb#LL5C50-L5C50

Example:

(def clj-kondo-version (or (System/getenv "CLJ_KONDO_VERSION") "2022.11.02"))

(pods/load-pod 'clj-kondo/clj-kondo clj-kondo-version)

Our team is looking for an easy way to pin clj-kondo versioning for both local development, ci and ides. This could help with local dev and CI a bit. (Using the lein plugin is a bit too slow for local dev compared to awesome babashka ;) )

Example desired invocation:

CLJ_KONDO_VERSION="2022.11.02" bb -Sdeps '{:deps {io.github.clj-kondo/clj-kondo-bb {:git/sha "665dc00b47ea83b996486b87dcd4e26d701bae6d"}}}' -x clj-kondo.core/exec --lint src

It'd be nice to partner with clojure-lsp as well to see if there could be a way to pin the clj-kondo version when desired there too!

Any other thoughts/ideas?

@borkdude
Copy link
Member

Yes, PR welcome for this.

About LSP: if you run it as a JVM process you can use any clj-kondo version with it that you prefer.

I'm using this ~/dev/clojure-lsp-dev script where I'm always using my local clj-kondo dev version:

#!/usr/bin/env bash

clj -Sdeps '{:aliases
              {:lsp
                {:replace-paths []
                 :replace-deps
                  {org.clojure/clojure {:mvn/version "1.11.1"}
                   clj-kondo/clj-kondo {:local/root "/Users/borkdude/dev/clj-kondo"}
                   clojure-lsp/clojure-lsp {:local/root "/Users/borkdude/dev/clojure-lsp/cli"}
                   cider/cider-nrepl {:mvn/version "0.28.6"}}}}}' \
                       -M:lsp -m clojure-lsp.main "$@"

Pinning the clj-kondo version with the lsp binary might not be so easy.

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

No branches or pull requests

2 participants