xsc / lein-ancient

Check your Projects for outdated Dependencies
MIT License
561 stars 33 forks source link

Ancient `:exclude` does not work for Clojure itself #90

Open eigenhombre opened 6 years ago

eigenhombre commented 6 years ago

consider this minimal project.clj:

(defproject ancientclojure "0.1.0-SNAPSHOT"
  :plugins [[lein-ancient "0.6.15"]]
  :dependencies [[org.clojure/clojure "1.8.0" :upgrade :clo]])

We're used to excluding specific dependencies using the :upgrade tag in project.clj; however, this does not seem to work with Clojure itself (now that 1.9 is out):

$ lein ancient :exclude clo
[org.clojure/clojure "1.9.0"] is available but we use "1.8.0" (use :check-clojure to upgrade)
xsc commented 6 years ago

@eigenhombre Thanks for reporting! You'll notice that the Clojure artifact won't influence lein-ancient's exit code, nor automatically be upgraded, unless :check-clojure is specified. But I agree, that this is kind of surprising behaviour, so it needs to be fixed.

I'll revamp the way artifact selection works for the 0.7.0 release of lein-ancient, throwing out all these :plugins, :allow-snapshots, :allow-qualified, etc... options and relying solely on :include, :exclude and an additional :ignore for artifact selection.

Introducing an explicit :ignore mechanism (check, print, but ignore for status code/upgrade) that can be overriden by :exclude should then address this issue.