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

NumberFormatException when checking some Artifacts #44

Closed
kij opened this issue Jan 20, 2015 · 3 comments
Closed

NumberFormatException when checking some Artifacts #44

kij opened this issue Jan 20, 2015 · 3 comments
Assignees
Labels

Comments

@kij
Copy link

kij commented Jan 20, 2015

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"]
@xsc
Copy link
Owner

xsc commented Jan 20, 2015

Sorry for not catching this before 0.6.0 [...]

No problem, that should generally be my job, I suppose. ;)

The thing is actually a bug in version-clj (and always should have been but maybe older versions of lein-ancient had more try/catch safeguards in place) which tries to parse e.g. this version:

0.0.1-20141002100138

and fails when running

(Integer/parseInt "20141002100138")
;; => #<NumberFormatException ...>

@xsc xsc self-assigned this Jan 20, 2015
@xsc xsc added the bug label Jan 20, 2015
@xsc xsc changed the title foreign repos NumberFormatException when checking some Artifacts Jan 20, 2015
@xsc xsc closed this as completed in 3407e05 Jan 20, 2015
@xsc
Copy link
Owner

xsc commented Jan 20, 2015

While this is fixed now, a problem remains, namely that e.g. 1.0.1-1 is treated as a newer (release!) version than 1.0.1 since version-clj expects non-release versions to have at least one non-numeric component.

If the versions with timestamp in your repository are actually SNAPSHOTs, lein-ancient will (at least for now) not treat them correctly I'm afraid.

Edit: Release with the fixes will follow soon.
Edit (2): [lein-ancient "0.6.1-SNAPSHOT"] released for now.

@xsc
Copy link
Owner

xsc commented Jan 20, 2015

Released in

[lein-ancient "0.6.1"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants