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

Failure handling version ranges #89

Open
mfikes opened this issue Jul 2, 2019 · 2 comments
Open

Failure handling version ranges #89

mfikes opened this issue Jul 2, 2019 · 2 comments

Comments

@mfikes
Copy link
Contributor

mfikes commented Jul 2, 2019

If a project specifies version ranges, you can end up with an error like

clojure.lang.ExceptionInfo: Unable to resolve org.clojure/clojure version: [1.2.0,)
{:lib org.clojure/clojure, :coord #:mvn{:version "[1.2.0,)"}}
 at clojure.tools.deps.alpha.extensions.maven$eval1008$fn__1011.invoke (maven.clj:54)
    clojure.lang.MultiFn.invoke (MultiFn.java:239)
    clojure.tools.deps.alpha$canonicalize_deps$fn__1351.invoke (alpha.clj:74)
...

Repro:

project.clj:

(defproject foo "1.0.0"
  :plugins [[lein-tools-deps "0.4.5"]]
  :middleware [lein-tools-deps.plugin/resolve-dependencies-with-deps-edn]
  :lein-tools-deps/config {:config-files [:install :user :project]})

deps.edn:

{:deps {net.cgrand/regex {:mvn/version "1.1.0"}}}

Then do lein deps. Note, that for this setup clj -Stree succeeds.

This regressed with the 1.10.1.455 release of Clojure tools.

If you instead use 1.10.1.447, you and do lein deps you will get

WARNING!!! version ranges found for:
[net.cgrand/regex "1.1.0"] -> [org.clojure/clojure "[1.2.0,)"]
Consider using [net.cgrand/regex "1.1.0" :exclusions [org.clojure/clojure]].

Note, to install and switch between different versions of the Clojure tools, I found this SO helpful: https://stackoverflow.com/a/55764594

@RickMoynihan
Copy link
Owner

RickMoynihan commented Jul 31, 2019

Hi @mfikes,

Thanks for the report. I'm not quite clear on what you're saying though. Are you saying that by downgrading the command line tools version to 1.10.1.447 you fixed this issue; but running with 1.10.1.455 causes it to break?

i.e. is your point that this is not a bug with lein-tools-deps but with tools.deps itself, or are you saying this is a bug in lein-tools-deps?

@mfikes
Copy link
Contributor Author

mfikes commented Jul 31, 2019

@RickMoynihan I'm just saying that, if you depend on a project that uses version ranges, the ability to do lein deps broke. (Not saying where the error lies.) But, having said that, the ability to do clj -Stree continues to work.

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