I generated a lib with clj-new
and am building a jar with depstar
. The generated deps.edn
lists clojure 1.10.2 as a dep, but i think it would work with any version. I'd like to use it from a project that's on an older version of clojure... is the declared dep on a newer version going to cause a conflict? I tried removing the dep from deps.edn
but then depstar
puts it back in the pom at 1.10.1
i feel like i don't need to list clojure as a dep at all but am curious what the recommended path is for this
@clj149 The root deps.edn
that is part of the Clojure CLI (in tools.deps.alpha
) supplies a default Clojure version. Your CLI version is probably 1.10.1.x which defaults to 1.10.1; the latest is 1.10.2.x which defaults to 1.10.2; 1.10.3 should be out soon.
If you're building a library, users can choose any version of Clojure they wish -- assuming there is a minimum compatible version of Clojure that you document in your project's README.
If you're building an application (uberjar), you can build it with any version of Clojure you want that is compatible with your code.
What I tend to do for libraries that are compatible with older versions of Clojure is put that in the deps.edn
as the default but also supply aliases for newer versions and then I run the tests against all the versions, via the aliases. See https://github.com/seancorfield/honeysql/blob/develop/run-tests.sh#L11-L19 as an example of running multi-version tests.
that sounds good, thanks. i looked in a few code files for where it might be coming from but i forgot about the root deps.edn