Git Product home page Git Product logo

lein-ancient's Introduction

lein-ancient

Clojars Artifact CI

A Leiningen plugin to check your project for outdated dependencies and plugins, as well as upgrade them if desired.

This plugin supersedes lein-outdated and uses metadata XML files in the different Maven repositories instead of a Lucene-based search index. Version comparison is done using version-clj.

lein-ancient is destined for Leiningen >= 2.4.0.

Usage

Once lein-ancient is installed, use Leiningen's built-in help feature to see how to use it:

lein help ancient
lein help ancient <subtask>

Check Artifacts

lein-ancient's default behaviour is to check your current project (or a given file/directory) for artifacts that have newer versions available, e.g.:

$ lein ancient
[com.taoensso/timbre "2.6.2"] is available but we use "2.1.2"
[potemkin "0.3.3"] is available but we use "0.3.0"
[pandect "0.3.0"] is available but we use "0.2.3"

You can specify the type of versions to check with :allow-snapshots, :allow-qualified and :allow-all, and the kind of artifacts with :plugins, :java-agents, and :all:

$ lein ancient :allow-snapshots
[com.taoensso/timbre "2.6.2"] is available but we use "2.1.2"
[potemkin "0.3.4-SNAPSHOT"] is available but we use "0.3.0"
[pandect "0.3.0"] is available but we use "0.2.3"
[midje "1.6-SNAPSHOT"] is available but we use "1.5.1"

$ lein ancient :plugins
[lein-midje "3.1.2"] is available but we use "3.0.1"

$ lein ancient :java-agents
[com.newrelic.agent.java/newrelic-agent "3.43.0"] is available but we use "3.35.1"

It works recursively, too:

$ lein ancient :recursive
-- ./panoptic/project.clj
[com.taoensso/timbre "2.6.2"] is available but we use "2.1.2"
[potemkin "0.3.3"] is available but we use "0.3.0"
[pandect "0.3.0"] is available but we use "0.2.3"

-- ./rewrite-clj/project.clj
[org.clojure/tools.reader "0.7.8"] is available but we use "0.7.5"
[potemkin "0.3.3"] is available but we use "0.3.2"

To let lein-ancient perform the same checks for the profiles in ~/.lein/profiles.clj, run it using:

$ lein ancient check-profiles [<options>]
...

Upgrade Artifacts

lein-ancient lets you upgrade artifacts automatically and interactively, accepting the same options as the default and profiles tasks:

$ lein ancient upgrade :interactive

[com.taoensso/timbre "2.6.2"] is available but we use "2.1.2"
Do you want to upgrade? [yes/no] yes

[potemkin "0.3.3"] is available but we use "0.3.0"
Do you want to upgrade? [yes/no] no

[pandect "0.3.0"] is available but we use "0.2.3"
Do you want to upgrade? [yes/no] yes

2 artifacts were upgraded.

Omit :interactive if lein-ancient should just do its thing; use :print for a dry-run, printing out the resulting file instead of writing back to disk. You can even perform a recursive upgrade run by supplying :recursive.

You can upgrade the global user profiles by running:

$ lein ancient upgrade-profiles [<options>]
...

Exclusion/Selection of Artifacts

It is possible to add a marker to an artifact vector using the :upgrade key:

:dependencies [[org.clojure/clojure "1.7.0"]
               [pandect "0.4.0" :upgrade :crypto]]

This can be :

  • the boolean value false: do never check/upgrade this artifact,
  • a keyword: mark the artifact with the given keyword,
  • a vector of keywords: mark the artifact with the given keywords.

By supplying :only or :exclude on the command line, you can run checks/upgrades on only those artifacts that match the given markers:

$ lein ancient upgrade :exclude crypto

There are two predefined markers that get attached to matching artifacts: snapshots to SNAPSHOT versions and qualified to qualified (i.e. alpha/beta/...) ones.

Note that :only/:exclude compose with the :dependencies/:plugins/:all options - to e.g. only upgrade SNAPSHOTs of plugins you'd use:

$ lein ancient upgrade :plugins :only snapshots

Regression Testing

You'd want to make sure that the upgraded dependencies don't mess with your library or application, wouldn't you? Unit tests are your friend and lein-ancient offers a mechanism to automatically run them after an upgrade - and revert to the original state if they fail. By default, lein test is used for testing; if you want a specific command to be run simply create an alias test in your project.clj:

...
  :aliases {"test" ["with-profile" "..." "midje"]}
...

(Note that referencing other aliases does not work yet.)

Inspect Artifact Versions

If you do not have access to a browser or are just too lazy/annoyed to leave the command line, the tasks get and latest might be just the thing for you! The former prints some human-readable artifact data to your console while the latter only retrieves the artifact vector, e.g. destined for your project.clj.

$ lein ancient show-versions com.taoensso/timbre :allow-all
Getting Version Information for com.taoensso/timbre from 2 Repositories ...
  * 39 version(s) found.
  * latest release:          "2.6.2"
  * latest SNAPSHOT:         "2.0.0-SNAPSHOT"
  * latest qualified:        "1.4.0-alpha1"
  * all releases:            [ "2.6.2" "2.6.1" "2.6.0" "2.5.0" "2.4.1" ...
...

$ lein ancient show-latest com.taoensso/timbre :allow-all
[com.taoensso/timbre "2.6.2"]

If you're using Emacs you can access this functionality using Adam Clement's latest-clojure-libraries plugin without leaving your buffer.

License

MIT License

Copyright (c) 2013-2021 Yannick Scherer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Derivative

lein-outdated Source Copyright © Alex Osborne & Contributors

lein-ancient's People

Contributors

adamclements avatar belucid avatar cap10morgan avatar danielcompton avatar darwin avatar daveliepmann avatar dijonkitchen avatar jasiskis avatar led avatar michaelblume avatar podviaznikov avatar sattvik avatar scgilardi avatar superstructor avatar tobereplaced avatar viebel avatar xsc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lein-ancient's Issues

Failure updating inherited profiles

{:arrdem {:plugins [;;;lein & nrepl plugins
                    [lein-marginalia "0.8.0"]
                    [jonase/eastwood "0.1.4"]
                    [lein-ancient "0.5.5"]
                    [lein-typed "0.3.5"]
                    [lein-kibit "0.0.8"]
                    ;; [lein-nodisassemble "0.1.3"]
                    [cider/cider-nrepl "0.8.0-SNAPSHOT"]
                    [lein-cloverage "1.0.2"]
                    [lein-auto "0.1.1"]
                    ]

          :injections [(require 'pjstadig.humane-test-output)
                       (pjstadig.humane-test-output/activate!)]

          :dependencies [;;;clojure.core libs
                         ;; [org.clojure/core.typed "0.2.50"]
                         ;; [org.clojure/core.logic "0.8.7"]
                         ;; [org.clojure/algo.generic "0.1.2"]

                         ;;;clojure tool libs
                         ;; [org.clojure/tools.trace "0.7.8"]
                         ;; [org.clojure/tools.logging "0.2.6"]
                         ;; [org.clojure/tools.reader "0.8.3"]

                         ;;;clojure data libs
                         ;; [org.clojure/data.json "0.2.4"]
                         ;; [org.clojure/data.xml "0.0.7"]

                         ;;;other random crap
                         ;; [instaparse "1.3.0"]
                         ;; [org.clojure/math.numeric-tower "0.0.4"]
                         ;; [org.clojure/algo.monads "0.1.5"]
                         ;; [expresso "0.2.0"]
                         ;; [revise "0.0.6"]

                         [pjstadig/humane-test-output "0.6.0"]
                         [org.clojure-grimoire/lein-grim "0.3.1"]
                         [radagast "2.0.1"]
                         ]

          :aliases {"radagast" ["run" "-m" "radagast.coverage" :project/whitelist]
                    "grim"     ["run" "-m" "grimoire.doc"
                                ,,:project/groupid
                                ,,:project/artifactid
                                ,,:project/version
                                ,,nil]}

          :deploy-repositories [["clojars" {:url "https://clojars.org/repo" :creds :gpg}]]

          :signing {:gpg-key "B33DF4E5"}}
 :user [:arrdem]}

$ lein ancient upgrade-profiles results in the following stacktrace:

java.lang.IllegalArgumentException: Key must be integer
 at clojure.lang.APersistentVector.assoc (APersistentVector.java:335)
    clojure.lang.APersistentVector.assoc (APersistentVector.java:18)
    clojure.lang.RT.assoc (RT.java:702)
    clojure.core$assoc.invoke (core.clj:187)
    clojure.core$update_in.doInvoke (core.clj:5698)
    clojure.lang.RestFn.invoke (RestFn.java:467)
    leiningen.ancient.utils.projects$collect_profiles_repositories.invoke (projects.clj:30)
    leiningen.ancient.upgrade$upgrade_artifact_file_BANG_.invoke (upgrade.clj:142)
    clojure.lang.AFn.applyToHelper (AFn.java:186)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invoke (core.clj:630)
    clojure.core$partial$fn__4234.doInvoke (core.clj:2474)
    clojure.lang.RestFn.invoke (RestFn.java:436)
    leiningen.ancient.upgrade$with_backup$fn__5980.invoke (upgrade.clj:193)
    clojure.lang.AFn.applyToHelper (AFn.java:160)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invoke (core.clj:624)
    leiningen.ancient.upgrade$with_abort$fn__5995.doInvoke (upgrade.clj:220)
    clojure.lang.RestFn.invoke (RestFn.java:436)
    leiningen.ancient.upgrade$run_upgrade_profiles_task_BANG_.invoke (upgrade.clj:285)
    leiningen.ancient$ancient.doInvoke (ancient.clj:62)
    clojure.lang.RestFn.invoke (RestFn.java:423)
    clojure.lang.Var.invoke (Var.java:383)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.core$apply.invoke (core.clj:626)
    leiningen.core.main$partial_task$fn__5914.doInvoke (main.clj:240)
    clojure.lang.RestFn.applyTo (RestFn.java:139)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invoke (core.clj:626)
    leiningen.core.main$apply_task.invoke (main.clj:290)
    leiningen.core.main$resolve_and_apply.invoke (main.clj:296)
    leiningen.core.main$_main$fn__5979.invoke (main.clj:366)
    leiningen.core.main$_main.doInvoke (main.clj:353)
    clojure.lang.RestFn.invoke (RestFn.java:421)
    clojure.lang.Var.invoke (Var.java:383)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.core$apply.invoke (core.clj:624)
    clojure.main$main_opt.invoke (main.clj:315)
    clojure.main$main.doInvoke (main.clj:420)
    clojure.lang.RestFn.invoke (RestFn.java:457)
    clojure.lang.Var.invoke (Var.java:394)
    clojure.lang.AFn.applyToHelper (AFn.java:165)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.main.main (main.java:37)

ancient upgrade :interactive is updating the wrong dependencies in project.clj

I tried upgrade :interactive like so on my project.clj:

[org.clojure/data.xml "0.0.8"] is available but we use "0.0.6"
Do you want to upgrade? [yes/no] yes

[org.clojure/core.incubator "0.1.3"] is available but we use "0.1.2"
Do you want to upgrade? [yes/no] yes

[hiccup "1.0.5"] is available but we use "1.0.1"
Do you want to upgrade? [yes/no] yes

[hickory "0.5.4"] is available but we use "0.2.0"
Do you want to upgrade? [yes/no] yes

[seesaw "1.4.4"] is available but we use "1.4.2"
Do you want to upgrade? [yes/no] yes

[org.cloudhoist/stevedore "0.8.0-alpha.1"] is available but we use "0.7.2"
Do you want to upgrade? [yes/no] no

[org.cloudhoist/pallet "0.8.0-alpha.9"] is available but we use "0.7.2"
Do you want to upgrade? [yes/no] no

[hiccup-bridge "1.0.1"] is available but we use "1.0.0-SNAPSHOT"
Do you want to upgrade? [yes/no] yes

[prismatic/plumbing "0.3.5"] is available but we use "0.3.3"
Do you want to upgrade? [yes/no] yes

For some of the dependencies it failed to update; for others it swapped version numbers. Here are some results in the project.clj file:

[org.clojure/core.incubator "0.1.2"]  -- failed to upgrade
[org.cloudhoist/pallet "1.0.1"]  -- swapped with the new hiccup-bridge version number evidently
[hiccup-bridge "0.3.5"] -- swapped with the new prismatic plumbing version number evidently
[prismatic/plumbing "0.3.3"] -- failed to upgrade

The mangled project.clj is below:

(defproject my-project/my-project "0.1.0-SNAPSHOT" 
  :license {:name "Eclipse Public License",
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.clojure/data.xml "0.0.8"]
                 [org.clojure/core.incubator "0.1.3"]
                 [clj-tagsoup "0.3.0"]
                 [hiccup "1.0.5"]
                 [hickory "0.5.4"]
                 [seesaw "1.4.4"]
                 [org.clojure/core.incubator "0.1.2"]
                 [org.cloudhoist/stevedore "0.7.2"]
                 [org.cloudhoist/pallet "1.0.1"]
                 [hiccup-bridge "0.3.5"]
                 [prismatic/plumbing "0.3.3"]
                 [utils "1.0.0-SNAPSHOT"]]
  :url "http://example.com/FIXME"
  :repositories {"sonatype"
                 "http://oss.sonatype.org/content/repositories/releases"}
  :min-lein-version "2.0.0"
  :description "FIXME: write description")

enhancement requests - warnings for invalid options, and optional colons

Suggesting that warnings are issued for unknown/invalid arguments. (Such as when I mistakenly put :update instead of :upgrade.)

Also it'd be nice if colons preceding the arguments were optional (upgrade and :upgrade). It seems the only reason to have colons is for familiarity for Clojure users.

Make subtask names more consistent

The subtask names throw me a bit (except the last one).

check
profiles
get
latest
upgrade
upgrade-profiles

For one thing, "get" makes it sound like the subtask is going to get (fetch, download) the artifacts (which, I realize, makes no sense).

As far as I understand, lein-ancient does essentially three things: it checks, shows, and upgrades. So, I think the subtask names would be more consistent as:

check-project
check-profiles
show-versions <artifact>
show-latest   <artifact>
upgrade-project
upgrade-profiles

lein ancient 0.4.3 is showing "Problem loading: Java heap space"

My profiles.clj

{:user {:plugins [[lein-difftest "2.0.0"]
                  [lein-marginalia "0.7.1"]
                  [lein-pprint "1.1.1"]
                  [lein-clojars "0.9.1"]
                  [lein-try "0.1.1"]
                  [lein-ancient "0.4.3"]
                  [lein-ancient "0.4.2"]
                  [lein-swank "1.4.5"] ]}}

And lein version: (Mac OSX 10.8.4)

Leiningen 2.2.0 on Java 1.7.0_25 Java HotSpot(TM) 64-Bit Server VM

Here's the output:

$ lein                                                              
Retrieving lein-ancient/lein-ancient/0.4.3/lein-ancient-0.4.3.pom from clojars
Retrieving rewrite-clj/rewrite-clj/0.2.0/rewrite-clj-0.2.0.pom from clojars
Retrieving ancient-clj/ancient-clj/0.1.2/ancient-clj-0.1.2.pom from clojars
Retrieving ancient-clj/ancient-clj/0.1.2/ancient-clj-0.1.2.jar from clojars
Retrieving lein-ancient/lein-ancient/0.4.3/lein-ancient-0.4.3.jar from clojars
Retrieving rewrite-clj/rewrite-clj/0.2.0/rewrite-clj-0.2.0.jar from clojars
Leiningen is a tool for working with Clojure projects.

Several tasks are available:

leiningen.ancient  Problem loading: java.lang.ClassNotFoundException: version_clj.split.SplitPoint, compiling:(version_clj/split.clj:53:1)

check               Check syntax and warn on reflection.
classpath           Write the classpath of the current project to output-file.
clean               Remove all files from project's target-path.
compile             Compile Clojure source into .class files.
deploy              Deploy jar and pom to remote repository.
deps                Show details about dependencies.
leiningen.difftest  Problem loading: Java heap space
leiningen.do  Problem loading: Java heap space
help                Display a list of tasks or help for a given task or subtask.
leiningen.install  Problem loading: Java heap space
leiningen.jack-in  Problem loading: Java heap space
jar                 Package up all the project's files into a jar file.
leiningen.javac  Problem loading: Java heap space
leiningen.keygen  Problem loading: Java heap space
leiningen.marg  Problem loading: Java heap space
leiningen.new  Problem loading: Java heap space
leiningen.plugin  Problem loading: Java heap space
leiningen.pom  Problem loading: Java heap space
leiningen.pprint  Problem loading: Java heap space
leiningen.push  Problem loading: Java heap space
leiningen.repl  Problem loading: Java heap space
leiningen.retest  Problem loading: Java heap space
leiningen.run  Problem loading: Java heap space
leiningen.search  Problem loading: Java heap space
leiningen.show-profiles  Problem loading: Java heap space
leiningen.swank  Problem loading: Java heap space
leiningen.swank-wrap  Problem loading: Java heap space
leiningen.test  Problem loading: Java heap space
leiningen.trampoline  Problem loading: Java heap space
leiningen.try  Problem loading: Java heap space
leiningen.uberjar  Problem loading: Java heap space
leiningen.update-in  Problem loading: Java heap space
leiningen.upgrade  Problem loading: Java heap space
leiningen.version  Problem loading: Java heap space
leiningen.with-profile  Problem loading: Java heap space

Run `lein help $TASK` for details.

Global Options:
  -o             Run a task offline.
  -U             Run a task after forcing update of snapshots.
  -h, --help     Print this help.
  -v, --version  Print Leiningen's version.

See also: readme, faq, tutorial, news, sample, profiles, deploying, gpg, mixed-source, templates, and copying.

Regression Tests after Dependency Upgrade

lein-ancient should handle the case where a newer version of an artifact causes incompatibilities in a project depending on it. The following are ways to either automatically ensure the stability/consistency of a project or to offer the possibility to revert a stable state.

See here for the comment that elaborated on potential issues with lein-ancient's current behaviour.

Do not overwrite the main profile

When upgrading dependencies, collect them in a new profile instead of overwriting the existing dependency vectors. This enables running tests using Leiningen's with-profile feature, letting the user decide whether to "activate" the new dependencies or to delete said profile (either by hand or automatically using lein-ancient).

Insertion of a new profile and automatic removal of it might cause issues with a project file's formatting.

Create a backup of the project file

The new artifacts are "live" immediately, reverting would be as simple as replacing the new project.clj with the backup one. Tests can be run without having to use with-profile, formatting issues should not arise.

This poses the question how to handle a requested upgrade if a backup file exists. A simple prompt à la "An existing backup file was detected. Do you want to continue?" might be enough to address this.

Automatically run Regression Tests

After an upgrade, existing tests are run immediately to determine incompatibilities. If everything passes, the backup project file is deleted/the main profile is replaced, otherwise changes will be undone. The possibility to run the tests after each upgraded dependency could facilitate the search for the cause of an incompatibility.

It has to be determined which test mechanism should be run (e.g. clojure.test, midje, speclj, ...) which poses the need for either a command line hint in the right direction (provided by the user) or usage of things like TravisCI's .travis.yml, containing the right call to use.

Fin

I'd really like to hear opinions or suggestions on this. lein-ancient shouldn't cause more problems than it solves.

Change Default Behaviour to 'upgrade'

Since the main reason one would run lein-ancient is checking if there are dependencies that can be upgraded, I'd argue that upgrading a project (in combination with sane regression testing, see #11) should be lein-ancient's default behaviour. The classic check-only routine would then be put in a separate "check" task.

Thoughts?

[Enhancement] Interactive mode where user can select/update if they want to update the libraries/plugins.

Hi,

It would be nice to have an interactive mode say:

$ lein ancient
[clj-http "0.7.5"] is available but we use "0.7.2"
"Would you like to update to this library version? [y/N]" n

[com.taoensso/timbre "2.3.0"] is available but we use "2.1.2"
"Would you like to update to this library version? [y/N]" y

[org.clojure/tools.namespace "0.2.3"] is available but we use "0.2.2"
"Would you like to update to this library version? [y/N]" y

Updated project.clj:
- [com.taoensso/timbre "2.3.0"]
- [org.clojure/tools.namespace "0.2.3"]

Done.

That way the user can just run the lein ancient the first time and update the project all from the command line itself. The same would work for users plugins as well.

To keep things simple, it wont work with agressive mode (at least for now).

Thoughts?

Support for repositories requiring credentials

If I use a s3-wagon-private repository like:

 ["private" {:url "s3p://my-s3-wagon/releases/" :creds :gpg}]

lein-ancient fails, presumably because retrieve-metadata! crashes. Support for this would be an excellent feature, though I'm not sure how it would be done.

new version indicated but not reported

(@xsc - thanks for keeping development of this active!)

% cat project.clj
(defproject abc "0.1.0-SNAPSHOT"
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.yaml/snakeyaml "1.12"]
                 [ch.qos.logback/logback-classic "1.0.12"]]
  :profiles {:dev
             {:dependencies [[midje "1.5.1"]]}})

% lein ancient
[ch.qos.logback/logback-classic "1.0.12"] is available but we use "1.0.12"
[midje/midje "1.5.1"] is available but we use "1.5.1"

% lein outdated
[ch.qos.logback/logback-classic "1.0.13"] is available but we use "1.0.12"
[midje/midje "1.6-alpha2"] is available but we use "1.5.1"

And this is a separate issue—but should reporting versions like "-alpha" as new be suppressed like "*-SNAPSHOT", or could be a command-line option?

Running Tests does not apply the upgraded Dependencies

$ rm -rf ~/.m2/repository/pandect
$ lein ancient upgrade
[pandect "0.5.0"] is available but we use "0.4.1"

running test task ["test"] ...
Retrieving pandect/pandect/0.4.1/pandect-0.4.1.pom from clojars
Retrieving pandect/pandect/0.4.1/pandect-0.4.1.jar from clojars

lein test tester.core-test

Ran 1 tests containing 0 assertions.
0 failures, 0 errors.
1/1 artifacts were upgraded.

Upgrade produced pandect 0.5.0, but tests fetched 0.4.1.

Leiningen versioning incorrect

Noticed that this plugin (0.6.2) doesn't work properly with Leiningen 2.2.0, which is the lower bound for leinegen requirements in the documentation.

Works properly with Leinegen 2.5.0.

Following error is produced when tried to run with Leinegen 2.2.0

$ lein ancient
java.lang.RuntimeException: No such var: leiningen.core.main/warn, compiling:(leiningen/ancient/artifact/options.clj:24:25)
    at clojure.lang.Compiler.analyze(Compiler.java:6380)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3573)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$TryExpr$Parser.parse(Compiler.java:2156)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3573)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$TryExpr$Parser.parse(Compiler.java:2127)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2669)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2669)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3573)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5938)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2664)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2669)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2669)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$NewExpr$Parser.parse(Compiler.java:2499)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.access$100(Compiler.java:37)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5973)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.access$100(Compiler.java:37)
    at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:529)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
    at clojure.lang.Compiler.analyze(Compiler.java:6361)
    at clojure.lang.Compiler.analyze(Compiler.java:6322)
    at clojure.lang.Compiler.eval(Compiler.java:6623)
    at clojure.lang.Compiler.load(Compiler.java:7064)
    at clojure.lang.RT.loadResourceScript(RT.java:370)
    at clojure.lang.RT.loadResourceScript(RT.java:361)
    at clojure.lang.RT.load(RT.java:440)
    at clojure.lang.RT.load(RT.java:411)
    at clojure.core$load$fn__5018.invoke(core.clj:5530)
    at clojure.core$load.doInvoke(core.clj:5529)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5336)
    at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
    at clojure.core$load_lib.doInvoke(core.clj:5374)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:619)
    at clojure.core$load_libs.doInvoke(core.clj:5417)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:619)
    at clojure.core$require.doInvoke(core.clj:5496)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at leiningen.ancient.check$eval5674$loading__4910__auto____5675.invoke(check.clj:1)
    at leiningen.ancient.check$eval5674.invoke(check.clj:1)

Regression tests should not be run if no tests configured

#11 and the associated commits add regression tests on upgrade, which is nice. However, Leiningen/Ancient also tries to run them if no tests are configured.

I suggest to just not try in this case, as otherwise one will run into this:

lein test user

Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
Could not locate test command .
(error) tests have failed (use ':no-tests' to disable testing).
(error) #<ExceptionInfo clojure.lang.ExceptionInfo: Suppressed exit {:exit-code 1, :suppress-msg true}>

Improve CLI Consistency

I'm not quite happy with the fact that the different lein-ancient tasks (:get, :upgrade) cannot be distinguished from the other command line parameters (:interactive, :plugins, ...). Future releases should thus adhere to a more conventional approach:

lein ancient [<options>]
lein ancient get <package> [<options>]
lein ancient upgrade [<options>]
lein ancient upgrade-global [<options>]

Upgrading when invalid version numbers are present in project map

I wondered if it would be possible to upgrade dependencies when invalid or non-existent dependencies are specified.

Right now, this is the behavior when you add non-existent ones:

:dependencies [[org.clojure/core.async "0.0.1"]]
(Could not find artifact org.clojure:core.async:jar:0.0.1 in central (https://repo1.maven.org/maven2/))
(Could not find artifact org.clojure:core.async:jar:0.0.1 in clojars (https://clojars.org/repo/))

Or invalid ones:

:dependencies [[org.clojure/core.async ""]]
java.lang.IllegalArgumentException: Bad artifact coordinates org.clojure:core.async:jar:, expected format is :[:[:]]:

Ideally, ancient would be able to upgrade to the latest valid one.

lein ancient profiles chokes on regexes

My ~/.lein/profiles.clj uses regular expressions to apply auth credentials to repositories. When processing several variants of regexs, "lein ancient profile" spits out:

ERROR: Could not read profiles map from file: #<File /Users/cch1/.lein/profiles.clj>
ERROR: Unsupported escape character: /

This appears to reference my auth clause:

:auth {:repository-auth {#"s3p://rk-maven" {:username :env/aws_access_key_id
:passphrase :env/aws_secret_key}}}

I notice that several other variants of the regex also provoke similar errors.

Upgrade "profiles.clj"

As discussed in #7, it would be nice to be able to upgrade the plugins contained in the file ~/.lein/profiles.clj. Also, it's possible to create a "profiles.clj" in your project root (if I'm not mistaken) which would profit from this feature, too.

utf8 content gets munged in upgrade

% cat project.clj
(defproject foo "0.1.0-SNAPSHOT"
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [ch.qos.logback/logback-classic "1.0.13"]]
  :cljsbuild {:builds [{:source-paths ["src-cljs"]
                        :compiler {:output-to "public/js/âbcdé.js"
                                   :source-map "public/js/âbcdé.js.map"
                                   :output-dir "public/js/cljs-compile"
                                   :optimizations :simple}}]})

% lein ancient upgrade

% cat project.clj
(defproject foo "0.1.0-SNAPSHOT"
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [ch.qos.logback/logback-classic "1.1.0"]]
  :cljsbuild {:builds [{:source-paths ["src-cljs"]
                        :compiler {:output-to "public/js/âbcdé.js"
                                   :source-map "public/js/âbcdé.js.map"
                                   :output-dir "public/js/cljs-compile"
                                   :optimizations :simple}}]})

fascinating the things one can break when using utf8. :)

Plugins prefixed with #_ cause problems

Plugins prefixed with #_ cause problems. Here is a sample profiles.clj:

$ cat ~/.lein/profiles.clj
{:user {:plugins [#_[lein-swank "1.4.5"]
                  [lein-ancient "0.5.4"]
                  [lein-droid "0.2.2"]
                  #_[lein-cljsbuild "0.3.2"]
                  [lein-exec "0.3.1"]
                  [lein-try "0.4.1"]]}}

I check the plugins and get a hit on lein-exec:

$ lein ancient profiles
[lein-exec "0.3.2"] is available but we use "0.3.1"

I upgrade the profiles:

$ lein ancient upgrade-profiles
[lein-exec "0.3.2"] is available but we use "0.3.1"
1 artifact was upgraded.

It looks re-assuring, but in fact the wrong plugin was changed. Instead of lein-exec being upgraded from 0.3.1 to 0.3.2, lein-droid was upgraded from 0.2.2 to 0.3.2:

$ cat ~/.lein/profiles.clj
{:user {:plugins [#_[lein-swank "1.4.5"]
                  [lein-ancient "0.5.4"]
                  [lein-droid "0.3.2"]
                  #_[lein-cljsbuild "0.3.2"]
                  [lein-exec "0.3.1"]
                  [lein-try "0.4.1"]]}}

That version of lein-droid doesn't exist, so it brings Leiningen into a bad state:

$ lein version
Could not find artifact lein-droid:lein-droid:jar:0.3.2 in central (http://repo1.maven.org/maven2/)
Could not find artifact lein-droid:lein-droid:jar:0.3.2 in clojars (https://clojars.org/repo/)
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.

I'm using Leiningen 2.3.4. Same problem with 0.5.5-SNAPSHOT as of just now.

If I remove the #_ from all plugins, it works.

Support read-eval macros in project.clj/profiles.clj

I'm using some read-eval macros in my profiles.clj, e.g.:

:source-paths [#=(eval (str (System/getProperty "user.home") "/analysis"))
               #=(eval (str (System/getProperty "user.home") "/.lein"))]

lein ancient currently chokes on those:

$ lein ancient profiles
ERROR: Could not read profiles map from file: #<File /Users/ben/.lein/profiles.clj>
ERROR: No reader function for tag =

Would it be possible to add support for read-eval macros to lein ancient (basically just ignore them)?

Error running lein ancient

Hey, just ran across this project, I'm quite interested. Automatically resolving the dependency graph is one of the features I miss from bundler in ruby. Unfortunately, I get this error when I try it on a simple toy project:

~/src/d20-maps[master]$ lein ancient
java.lang.RuntimeException: No such var: uu/resolve-credentials, compiling:(leiningen/ancient/maven_metadata/s3p.clj:11)

"lein ancient" calls timing out behind VPN and Proxy connection

Hi! Today I upgraded from "lein-ancient 0.5.2" to "lein-ancient 0.6.4". I'm doing my work behind a VPN into a corporate network and need a proxy to get past the firewall. This makes connections to external "http" addresses slower.

With version 0.5.2, I could run "lein ancient ..." with this setup by just setting the "http_proxy" and "https_proxy" env variables to the right proxy values. I was able to do that today still successfully before updating to version 0.6.4. After updating to 0.6.4, I'm getting connection timeouts for every single package I have in my project's map. Below is a sample setting env variable "DEBUG=1":

Leiningen's classpath: :/usr/local/Cellar/leiningen/2.5.1/libexec/leiningen-2.5.1-standalone.jar
Applying task ancient to []
(debug) repositories: {"central" {:snapshots false, :url "https://repo1.maven.org/maven2/"}, "clojars" {:url "https://clojars.org/repo/"}}
(debug) cli options: {:dependencies? true, :plugins? false, :recursive? false, :interactive? false, :print? false, :tests? true, :profiles? true, :check-clojure? false, :qualified? false, :snapshots? false, :colors? true}
(debug) repositories: nil
(debug) -- artifact [com.microsoft/sqljdbc4 "3.0"] at [:dependencies 1] ... (2 repositories)
(debug) -- artifact [org.clojure/data.csv "0.1.2"] at [:dependencies 13] ... (2 repositories)
(debug) -- artifact [org.clojure/data.json "0.2.6"] at [:dependencies 12] ... (2 repositories)
(debug) -- artifact [org.jfree/jfreechart "1.0.19"] at [:dependencies 11] ... (2 repositories)
(debug) -- artifact [incanter/incanter-charts "1.9.0"] at [:dependencies 10] ... (2 repositories)
(debug) -- artifact [incanter/incanter-io "1.9.0"] at [:dependencies 9] ... (2 repositories)
(debug) -- artifact [incanter/incanter-core "1.9.0"] at [:dependencies 8] ... (2 repositories)
(debug) -- artifact [org.slf4j/slf4j-log4j12 "1.7.10"] at [:dependencies 7] ... (2 repositories)
(debug) -- artifact [org.clojure/tools.logging "0.3.1"] at [:dependencies 6] ... (2 repositories)
(debug) -- artifact [net.mikera/core.matrix "0.33.2"] at [:dependencies 5] ... (2 repositories)
(debug) -- artifact [log4j "1.2.17"] at [:dependencies 4] ... (2 repositories)
(debug) -- artifact [org.clojure/java.jdbc "0.3.6"] at [:dependencies 3] ... (2 repositories)
(debug) -- artifact [net.sourceforge.jtds/jtds "1.3.1"] at [:dependencies 2] ... (2 repositories)
(warn)  [clojars] - Δ 6334ms - failure when checking incanter/incanter-io: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [clojars] - Δ 6336ms - failure when checking org.slf4j/slf4j-log4j12: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [clojars] - Δ 6333ms - failure when checking incanter/incanter-core: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [clojars] - Δ 6337ms - failure when checking com.microsoft/sqljdbc4: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [clojars] - Δ 6334ms - failure when checking org.clojure/tools.logging: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [clojars] - Δ 6334ms - failure when checking org.clojure/java.jdbc: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [clojars] - Δ 6335ms - failure when checking org.clojure/data.csv: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [clojars] - Δ 6335ms - failure when checking org.clojure/data.json: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [clojars] - Δ 6336ms - failure when checking log4j/log4j: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [clojars] - Δ 6335ms - failure when checking incanter/incanter-charts: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [clojars] - Δ 6335ms - failure when checking org.jfree/jfreechart: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [clojars] - Δ 6332ms - failure when checking net.mikera/core.matrix: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [clojars] - Δ 6334ms - failure when checking net.sourceforge.jtds/jtds: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [central] - Δ 8341ms - failure when checking org.clojure/java.jdbc: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [central] - Δ 8344ms - failure when checking incanter/incanter-io: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [central] - Δ 8343ms - failure when checking org.jfree/jfreechart: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [central] - Δ 8340ms - failure when checking net.mikera/core.matrix: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [central] - Δ 8341ms - failure when checking net.sourceforge.jtds/jtds: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [central] - Δ 8349ms - failure when checking com.microsoft/sqljdbc4: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [central] - Δ 8345ms - failure when checking log4j/log4j: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [central] - Δ 8346ms - failure when checking org.slf4j/slf4j-log4j12: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [central] - Δ 8343ms - failure when checking incanter/incanter-charts: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [central] - Δ 8341ms - failure when checking incanter/incanter-core: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [central] - Δ 8343ms - failure when checking org.clojure/data.csv: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [central] - Δ 8342ms - failure when checking org.clojure/tools.logging: org.httpkit.client.TimeoutException: connect timeout: 3000ms
(warn)  [central] - Δ 8344ms - failure when checking org.clojure/data.json: org.httpkit.client.TimeoutException: connect timeout: 3000ms
all artifacts are up-to-date.

Is there a way to configure to timeout to be longer than "3000ms" so that I can run "lein ancient" in this setup. I can still work by disconnecting from the VPN and use my direct internet connection, but for work purposes this is cumbersome.

Thank you so much! Best regards, Holger

v6.5+: java.lang.Exception: response content-type is not XML

Hi Yannick,

I'm running into a problem with lein-ancient 6.5+ (6.5 and 6.6). Running lein ancient :all at the command line produces:

(warn)  [central] - Δ 2112ms - failure when checking com.cemerick/clojurescript.test: java.lang.Exception: response content-type is not XML (#{"text/xml" "application/xml"}): null
(warn)  [central] - Δ 2115ms - failure when checking org.clojure/tools.reader: java.lang.Exception: response content-type is not XML (#{"text/xml" "application/xml"}): null
(warn)  [clojars] - Δ 2364ms - failure when checking lein-autoexpect/lein-autoexpect: java.lang.Exception: response content-type is not XML (#{"text/xml" "application/xml"}): null
(warn)  [clojars] - Δ 2377ms - failure when checking lein-expectations/lein-expectations: java.lang.Exception: response content-type is not XML (#{"text/xml" "application/xml"}): null
(warn)  [clojars] - Δ 2382ms - failure when checking com.cemerick/clojurescript.test: java.lang.Exception: response content-type is not XML (#{"text/xml" "application/xml"}): null
(warn)  [clojars] - Δ 2412ms - failure when checking lein-pprint/lein-pprint: java.lang.Exception: response content-type is not XML (#{"text/xml" "application/xml"}): null
(warn)  [clojars] - Δ 2436ms - failure when checking lein-ancient/lein-ancient: java.lang.Exception: response content-type is not XML (#{"text/xml" "application/xml"}): null
(warn)  [clojars] - Δ 2447ms - failure when checking codox/codox: java.lang.Exception: response content-type is not XML (#{"text/xml" "application/xml"}): null
(warn)  [sonatype-oss-public] - Δ 2571ms - failure when checking com.cemerick/clojurescript.test: java.lang.Exception: response content-type is not XML (#{"text/xml" "application/xml"}): null
(warn)  [sonatype-oss-public] - Δ 2631ms - failure when checking org.clojure/tools.reader: java.lang.Exception: response content-type is not XML (#{"text/xml" "application/xml"}): null
(warn)  [clojars] - Δ 1584ms - failure when checking expectations/expectations: java.lang.Exception: response content-type is not XML (#{"text/xml" "application/xml"}): null
(warn)  [clojars] - Δ 1586ms - failure when checking com.cemerick/double-check: java.lang.Exception: response content-type is not XML (#{"text/xml" "application/xml"}): null
all artifacts are up-to-date.

This happens reliably on my end, so a little surprised no one else has reported this yet? Any ideas?

Thanks a lot! Cheers :-)

Work on templated project.clj files

Hey xsc,

Thanks for the work you've done on lein-ancient I like to use it as much as I can and has made life on the version management level a lot easier so thumbs up. The new :upgrade has been something I long anticipated for as well so I'm a happy camper.

One thing I noticed today though, which probably would make for a nice feature expansion, is if it would be possible to process any leiningen/new/project.clj files. Those have some handlebars in them for file names and such like {{project_name}} and what not. As it seems, currently ancient will throw exceptions on these.

Reason being a lot of projects like, for example Pedestal which I am updating parts of, carry around templates to help bootstrap their application and I feel these could benefit as well from the magic. Another next step could be to (use fs?) to find nested project.clj files within a folder and :interactive-ly perhaps ask for those to be checked as well or turned on perhaps using a :nested or the likes to enable searching the subfolders and taking those into account? Just an idea that popped up, let me know what you think.

Regards,
Rob

Not detecting new version of Clojure

Not sure if I am doing this right, my project.clj refers to clojure as:

:dependencies [[org.clojure/clojure "1.5.1"]
                   ...]

When I run lein ancient latest org.clojure/clojure I get this:

$ lein ancient latest org.clojure/clojure
[org.clojure/clojure "1.6.0"]

But when I do just lein ancient it doesn't detect that my clojure is out of date:

$ lein ancient
$

It did detect other outdated packages fine though (the command above was after I ran :upgrade)

$ lein ancient
[http-kit "2.1.18"] is available but we use "2.1.16"
[org.clojure/clojurescript "0.0-2197"] is available but we use "0.0-2156"
[me.raynes/conch "0.5.1"] is available but we use "0.5.0"

project.clj for the project I am trying to ancient with:
https://github.com/verma/dakait/blob/7d06c0c2cfb0b12877d6d6a94a0524da6508e98e/project.clj

Edit: Changed URL to commit url instead of master.

Generate report at the end of a recursive upgrade.

If there are a lot of projects, it might help to have a concise list of those that actually had upgrades performed and those that failed to upgrade.

On a related note: just because one upgrade fails, the process should not stop processing the remaining projects.

`lein ancient upgrade` gives "ERROR: could not create zipper" on keyword with number and 2 dots

lein ancient upgrade doesn't like the :1.5.0 and :1.5.1 keywords in Midje's project file: https://github.com/marick/Midje/blob/master/project.clj

Works okay if something like :1.5.0 is changed to :a.5.0

(defproject midje "1.6-SNAPSHOT"
  :description "A TDD library for Clojure that supports top-down ('mockish') TDD, encourages readable tests, provides a smooth migration path from clojure.test, balances abstraction and concreteness, and strives for graciousness."
  :url "https://github.com/marick/Midje"
  :dependencies [[org.clojure/clojure "1.4.0"]
                 [ordered "1.2.0" :exclusions [org.clojure/clojure]]
                 [org.clojure/math.combinatorics "0.0.1"]
                 [org.clojure/core.unify "0.5.2" :exclusions [org.clojure/clojure]]
                 [utilize "0.2.3" :exclusions [org.clojure/clojure]]
                 [colorize "0.1.1" :exclusions [org.clojure/clojure]]
                 [org.clojure/tools.macro "0.1.1"]
                 [bultitude "0.2.2"]
                 [swiss-arrows "0.1.0"]
                 [org.clojure/tools.namespace "0.2.2"]
                 [slingshot "0.10.3"]
                 [commons-codec/commons-codec "1.6"]
                 [gui-diff "0.5.0"]
                 [clj-time "0.6.0"]]
  :profiles {:dev {:dependencies [[slamhound "1.2.0"]
                                  [jonase/kibit "0.0.3"]
                                  [prismatic/plumbing "0.1.0"]
                                  [jonase/eastwood "0.0.2"]]
                   :plugins [[lein-midje "3.0.0"]]}
             :test-libs {:dependencies [[prismatic/plumbing "0.1.0"]]}
             :1.3 [:test-libs {:dependencies [[org.clojure/clojure "1.3.0"]]}]
             :1.4 [:test-libs {:dependencies [[org.clojure/clojure "1.4.0"]]}]
             :1.5.0 [:test-libs {:dependencies [[org.clojure/clojure "1.5.0"]]}]
             :1.5.1 [:test-libs {:dependencies [[org.clojure/clojure "1.5.1"]]}]
             ;; The following profile can be used to check that `lein with-profile`
             ;; profiles are obeyed. Note that profile `:test-paths` *add on* to the
             ;; defaults.
             :test-test-paths {:test-paths ["test-test-paths"]}}
  :resource-paths ["test-resources"]
  :license {:name "The MIT License (MIT)"
            :url "http://opensource.org/licenses/mit-license.php"
            :distribution :repo}
  :mailing-list {:name "Midje"
                 :subscribe "https://groups.google.com/forum/?fromgroups#!forum/midje"}
  :aliases {"compatibility" ["with-profile" "1.3:1.4:1.5.0:1.5.1" "test"]}

  ;; For Clojure snapshots
  :repositories {"sonatype-oss-public" "https://oss.sonatype.org/content/groups/public/"
                 "stuartsierra-releases" "http://stuartsierra.com/maven2"})

Lein-ancient incompatible with latest cljfmt

cc @weavejester

It seems that this plugin v0.6.2 is incompatible with cljfmt as this uses rewrite-clj v0.4.11 whereas cljfmt uses v0.4.12 and there seems to some incompatibilites between the two version.

The latest version of rewrite-clj seems to be v0.4.12.

I don't get an error if I just use either of them individually in a clean project. The error I get when I use both is:

java.lang.ClassCastException: fast_zip.core.ZipperLocation cannot be cast to clojure.lang.IFn
 at clojure.zip$next.invoke (zip.clj:236)
    rewrite_clj.zip.find$find_next.invoke (find.clj:48)
    cljfmt.core$edit_all.invoke (core.clj:12)
    clojure.lang.AFn.applyToHelper (AFn.java:160)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invoke (core.clj:626)
    cljfmt.core$transform.doInvoke (core.clj:17)
    clojure.lang.RestFn.invoke (RestFn.java:464)
    cljfmt.core$remove_surrounding_whitespace.invoke (core.clj:31)
    cljfmt.core$reformat_form.doInvoke (core.clj:208)
    clojure.lang.RestFn.invoke (RestFn.java:423)
    cljfmt.core$reformat_string.doInvoke (core.clj:216)
    clojure.lang.RestFn.invoke (RestFn.java:423)
    leiningen.cljfmt$reformat_string.invoke (cljfmt.clj:23)
    leiningen.cljfmt$valid_format_QMARK_.invoke (cljfmt.clj:27)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invoke (core.clj:626)
    clojure.core$partial$fn__4228.doInvoke (core.clj:2468)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    clojure.core$complement$fn__4082.invoke (core.clj:1370)
    clojure.core$filter$fn__4264.invoke (core.clj:2605)
    clojure.lang.LazySeq.sval (LazySeq.java:40)
    clojure.lang.LazySeq.seq (LazySeq.java:49)
    clojure.lang.RT.seq (RT.java:484)
    clojure.core$seq.invoke (core.clj:133)
    clojure.core$empty_QMARK_.invoke (core.clj:5706)
    leiningen.cljfmt$check.doInvoke (cljfmt.clj:58)
    clojure.lang.RestFn.applyTo (RestFn.java:142)
    clojure.core$apply.invoke (core.clj:626)
    leiningen.cljfmt$check.invoke (cljfmt.clj:54)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.RestFn.applyTo (RestFn.java:132)
    clojure.core$apply.invoke (core.clj:626)
    leiningen.cljfmt$cljfmt.doInvoke (cljfmt.clj:79)
    clojure.lang.RestFn.invoke (RestFn.java:425)
    clojure.lang.Var.invoke (Var.java:383)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.core$apply.invoke (core.clj:626)
    leiningen.core.main$partial_task$fn__6094.doInvoke (main.clj:263)
    clojure.lang.RestFn.applyTo (RestFn.java:139)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invoke (core.clj:626)
    leiningen.core.main$apply_task.invoke (main.clj:313)
    leiningen.core.main$resolve_and_apply.invoke (main.clj:319)
    leiningen.core.main$_main$fn__6160.invoke (main.clj:392)
    leiningen.core.main$_main.doInvoke (main.clj:385)
    clojure.lang.RestFn.invoke (RestFn.java:421)
    clojure.lang.Var.invoke (Var.java:383)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.core$apply.invoke (core.clj:624)
    clojure.main$main_opt.invoke (main.clj:315)
    clojure.main$main.doInvoke (main.clj:420)
    clojure.lang.RestFn.invoke (RestFn.java:457)
    clojure.lang.Var.invoke (Var.java:394)
    clojure.lang.AFn.applyToHelper (AFn.java:165)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.main.main (main.java:37)

local repo breaks plugin

Howdy!

I've got the following in my project.clj:

    :repositories [["local" {:url ~(str (.toURI (java.io.File. "repo")))
                               :checksum :ignore}]]

pointing to a local repo with Oracle JDBC drivers in it. As a result, I get the following exception:

java.lang.IllegalArgumentException: No method in multimethod 'find-retriever' for dispatch value: null
    at clojure.lang.MultiFn.getFn(MultiFn.java:160)
    at clojure.lang.MultiFn.invoke(MultiFn.java:227)
    at clojure.core$map$fn__4207.invoke(core.clj:2487)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.Cons.next(Cons.java:39)
    at clojure.lang.RT.countFrom(RT.java:540)
    at clojure.lang.RT.count(RT.java:530)
    at leiningen.ancient$ancient.doInvoke(ancient.clj:83)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at clojure.lang.Var.invoke(Var.java:415)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:619)
    at leiningen.core.main$resolve_task$fn__2160.doInvoke(main.clj:148)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:619)
    at leiningen.core.main$apply_task.invoke(main.clj:188)
    at leiningen.core.main$resolve_and_apply.invoke(main.clj:192)
    at leiningen.core.main$_main$fn__2223.invoke(main.clj:256)
    at leiningen.core.main$_main.doInvoke(main.clj:246)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.lang.Var.invoke(Var.java:415)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:617)
    at clojure.main$main_opt.invoke(main.clj:335)
    at clojure.main$main.doInvoke(main.clj:440)
    at clojure.lang.RestFn.invoke(RestFn.java:436)
    at clojure.lang.Var.invoke(Var.java:423)
    at clojure.lang.AFn.applyToHelper(AFn.java:167)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)

I know, I know: having a local repo isn't kosher. Completely ignoring this sort of thing would work for me. ;)

K

Simply does not work

Given the snapshot build and a project file like this:

(defproject clj-oneliner "1.0.0"
  :description "Extract a one-liner from a piece of text"
  :url "https://github.com/jaccarmac/clj-oneliner"
  :license {:name "Unlicense"
            :url "http://unlicense.org/"}
  :dependencies [[org.clojure/clojure "1.0.0"]
                 [org.clojure/tools.cli "0.3.1"]])

all lein ancient commands I try to run give no output. Those commands include:

lein ancient
lein ancient :all
lein ancient :allow-all
lein ancient :allow-all :all
lein ancient :recursive
...

Windows cmd.exe and escape sequences

Hello

lein-ancient does not detect what kind of terminal it's running in and prints "unix" escape sequences on Windows' cmd, as shown on attached screenshot:

screnshot

Best Regards
mp

No warnings on SSLException

Hello,

lein ancient fails silently on SSLExceptions.

e.g.

$ lein ancient
[com.draines/postal "1.11.1"] is available but we use "1.11.0"
[garden "1.1.3"] is available but we use "1.1.2"
$ LEIN_JVM_OPTS=-Djavax.net.ssl.trustStore= lein ancient
$

Normally, (slurp "https://domain-with-invalid-cert.com/") raises an SSLException, so IMHO it would be appropriate to warn the user when slurping metadata fails due to SSL errors, as opposed to an HTTP 404.

Running with DEBUG=1 does give a clue:

Leiningen's classpath: :/home/guns/.lein/self-installs/leiningen-2.3.3-standalone.jar
Applying task ancient to ()
…
(verbose) Checking com.draines/postal (current version: "1.11.0" at [:dependencies 0]) ...
(verbose)   Trying to retrieve http://repo1.maven.org/maven2/com/draines/postal/maven-metadata.xml ...
(verbose)   Trying to retrieve https://clojars.org/repo/com/draines/postal/maven-metadata.xml ...
(verbose) Checking com.yahoo.platform.yui/yuicompressor (current version: "2.4.7" at [:dependencies 1]) ...
(verbose)   Trying to retrieve http://repo1.maven.org/maven2/com/yahoo/platform/yui/yuicompressor/maven-metadata.xml ...
(verbose)   Got 404 byte(s) of data.
(verbose) Checking garden/garden (current version: "1.1.2" at [:dependencies 3]) ...
(verbose)   Trying to retrieve http://repo1.maven.org/maven2/garden/garden/maven-metadata.xml ...
(verbose)   Trying to retrieve https://clojars.org/repo/garden/garden/maven-metadata.xml ...
(verbose) Done.

But the only indication that a failure has occured is the absence of the line "Got %d byte(s) of data."

upgrade-profiles does nothing although profiles lists outdated

Currently, with lein-ancient 0.5.4 I get:

% lein ancient profiles
[lein-html5-docs "2.1.0"] is available but we use "2.0.2"

But upgrade-profiles doesn't do anything:

 % lein ancient upgrade-profiles
Nothing was upgraded.

I'd expect it to upgrade from lein-html5-docs 2.0.2 to 2.1.0.

This is my ~/.lein/profiles.clj:

{:user {:plugins [[lein-ancient "0.5.4"]]}
 :docs {:plugins [[lein-html5-docs "2.0.2"]
                  [lein-marginalia "0.7.1"]]}}

Profiles in profiles.d are not scanned

As an alternative to a single ~/.lein/profiles.clj file I have several profiles defined in ~/.lein/profiles.d/ such as user.clj, system.clj, etc. The plugin currently doesn't detect these, so running the profiles action doesn't do anything:

% lein ancient profiles
No file at: ~/.lein/profiles.clj

Leiningen environment variable

When I run lein ancient upgrade-profiles it tries to upgrade C:\Users.lein\profiles.clj, although my LEIN_HOME variable points some where else. Would be great if lein-ancient would use that one as well.

data.priority-map

Not sure if this is something that your latest snapshot is using directly or transitively, but if I have the dev snapshot in my profiles.clj, lein new fails due to a missing dep error.

is it possible to use lein-ancient as a library

I'm having trouble using this plugin as a library in my own code.

I included [lein-ancient "0.4.2"] into dependencies and try to run some code from the tests in repl.

But failed to do that.

Getting exception Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate clojure/instant__init.class or clojure/instant.clj on classpath:.

I'm new to Clojure and want to ask if it's in general possible to use lein plugins as libraries.

Thank you.

Yuicompressor throws an exception

I just tried running lein ancient :upgrade :interactive in a project using com.yahoo.platform/yui/yuicompressor, and it threw an exception:

$ lein ancient :upgrade :interactive
clojure.lang.ExceptionInfo: Invalid token: com.yahoo.platform/yui/yuicompressor {:column 55, :line 15, :type :reader-exception}
    at clojure.core$ex_info.invoke(core.clj:4327)
    at clojure.tools.reader.reader_types$reader_error.doInvoke(reader_types.clj:217)
    at clojure.lang.RestFn.invoke(RestFn.java:439)
    at clojure.tools.reader.edn$read_symbol.invoke(edn.clj:246)
    at clojure.tools.reader.edn$read.invoke(edn.clj:364)
    at clojure.tools.reader.edn$read.invoke(edn.clj:349)
[snip]
    at leiningen.ancient.tasks.upgrade$upgrade_file_BANG_.invoke(upgrade.clj:132)
    at clojure.lang.AFn.applyToHelper(AFn.java:172)
    at clojure.lang.AFn.applyTo(AFn.java:151)
    at clojure.core$apply.invoke(core.clj:619)
    at clojure.core$partial$fn__4190.doInvoke(core.clj:2396)
    at clojure.lang.RestFn.invoke(RestFn.java:436)
    at leiningen.ancient.tasks.upgrade$run_upgrade_task_BANG_.invoke(upgrade.clj:160)
    at leiningen.ancient$ancient.doInvoke(ancient.clj:42)
[...]

subtask help strings for "get" and "latest" should differ

Output from lein help ancient says:

Subtasks available:
check                Check projects for outdated artifacts. (default)
profiles             Check profiles for outdated artifacts.
get                  List all versions for a given artifact.
latest               List all versions for a given artifact.
upgrade              Upgrade all project artifacts.
upgrade-profiles     Upgrade all artifacts in the global and local profiles.

The help lines for the "get" and "latest" subtasks are identical, which I think is incorrect.

Also, maybe the one for get should mention "human-readable", whereas the one for latest might note, "suitable for inclusion in project.clj" or similar.

NumberFormatException when checking some Artifacts

Sorry for not catching this before 0.6.0 The 0.6.0-snaphot (pre chrismas) i was using worked as expected.

On this miminal project.clj, lein ancient 0.6.0 and (newer 0.6.0-snapshots) fails with
(error) #<ExecutionException java.util.concurrent.ExecutionException: java.lang.NumberFormatException: For input string: "20141107165303">

(defproject bam "1b"
  :description "bam"
  :dependencies [[io.intercom/intercom-java "1.0.0"]]
  :repositories [["jcenter" {:url "http://jcenter.bintray.com"}]])

lein-ancient 0.5.5 returns

 [io.intercom/intercom-java "1.0.1"] is available but we use "1.0.0"]

Awesome tagged releases!

Hi Yannick, this isn't an issue, feel free to close - just wanted to say how nice your tagged releases are: https://github.com/xsc/lein-ancient/releases

I didn't even know GitHub offered that facility - this is the first time I've seen someone using it. Awesome stuff, thanks for putting in the effort :-)

That's it, cheers!

Make 'test' the fallback regression test alias?

If the test-ancient alias is not defined, should we fall back to test? It is after all the standard test alias, and I often find myself overriding it e.g. when using Midje. (A lot of people are used to clojure.test and they seem to always try that one first.)

This should only be a problem if the libraries needed for running tests are not available in the :dev profile since lein test will throw an exception in that case and let regression tests fail.

Thoughts?

s3p repos not checked for new versions

I use an s3p repo for many dependencies. The documentation for lein ancient references the s3-wagon-private plugin, which I use (version "1.1.2"). Yet outdated dependencies are not signalled. No errors are signalled, but clearly outdated dependencies are not noted.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.