In my project.clj, I haven't included org.clojure/clojure dependency and have added it as an exclusion in the dev profile.
When I run lein cp it includes clojure 1.11.1. Also, asking lein deps about why it was included:
➜ project git:(master) ✗ lein deps :why org.clojure/clojure
Warning: Clojure is excluded, assuming an appropriate fork (Clojure 1.8 or later) is provided.
If there are a lot of uncached dependencies this might take a while ...
[org.clojure/clojure 1.11.1]
Why is clojure being included in the classpath and dependencies?
project.clj
https://clojurians.slack.com/archives/C03KZ3XT0CF/p1704968707105509?thread_ts=1697986872.473769&cid=C03KZ3XT0CFJust in case, try lein with-profile -user,-dev classpath
I guess it's brought it by a dependency, a plugin or perhaps Lein itself?
lein with-profile -user,-dev deps :tree should also help.
If adding :exclusions doesn't help, you can try adding clojure versions in dedicated profiles, similarly to this:
https://github.com/clojure-emacs/refactor-nrepl/blob/e3da5e4ea88dbadfe2a5f05e0fbe195a1bb16db8/project.clj#L42-L43
lein with-profile -user,-dev deps :tree also includes
# grep results
[commons-codec "1.10" :exclusions [[org.clojure/clojure]]]
[commons-io "2.4" :exclusions [[org.clojure/clojure]]]
[quoin "0.1.2" :exclusions [[org.clojure/clojure]]]
[org.apache.httpcomponents/httpclient "4.5" :exclusions [[org.clojure/clojure]]]
[org.apache.httpcomponents/httpcore "4.4.1" :exclusions [[org.clojure/clojure]]]
[org.apache.httpcomponents/httpmime "4.5" :exclusions [[org.clojure/clojure]]]
[org.clojure/clojure "1.11.1"]
[org.clojure/clojurescript "1.10.597"]
[org.nrepl/incomplete "0.1.0" :exclusions [[org.clojure/clojure]]]
[potemkin "0.4.1" :exclusions [[org.clojure/clojure]]]
[slingshot "0.12.2" :exclusions [[org.clojure/clojure]]]
[de.kotka/lazymap "3.1.0" :exclusions [[org.clojure/clojure]]]My usecase is to use to use clojure-storm that has a drop in replacement for clojure. But lein overrides it with official clojure, somehow.
Have you the same commands tried in an empty project? with a top-level :exclusions [org.clojure/clojure] entry
On a new project if, I don't explicitly put org.clojure/clojure in deps, it doesn't show up in lein deps :tree
You could try progressively deleting plugins and deps until it disappears Like a bisect :)
Thanks vemv, I was feeling stuck and this helps. I will try bisecting