LonoCloud / lein-voom

Tool for generating artifacts versioned on the most recent git commit sha and commit time.
Eclipse Public License 2.0
97 stars 14 forks source link

Infinite loop on bad version specification #53

Open smishmash opened 8 years ago

smishmash commented 8 years ago

I accidentally gave a dependency a version with only the git revision portion, thus:

                 ^{:voom {:repo "git@github.com:LonoCloud/beorn.git"}}
                 [lonocloud.mirkwood/mirkwood-jvm-common "20160315_163803-g725ade1"]]

The correct version specification would have been 0.1.0-20160315_163803-g725ade1. Then lein voom build-deps got into an infinite loop, building the dependency, and failing to find the correct version. Here's an excerpt from the build output:

$ lein voom build-deps
WARNING: record? already refers to: #'clojure.core/record? in namespace: clojure.core.logic, being replaced by: #'clojure.core.logic/record?
Reflection warning, leiningen/voom.clj:184:3 - reference to field getBytes can't be resolved.
-- build-deps for mirkwood-clj
Did not find, will build  {:groupId lonocloud.mirkwood, :artifactId mirkwood-jvm-common, :version 20160315_163803-g725ade1}
Calling recursive build-deps on: /home/smishra/.voom-repos/Z2l0QGdpdGh1Yi5jb206TG9ub0Nsb3VkL2Jlb3JuLmdpdA==/modules/mirkwood/jvm-common
WARNING: record? already refers to: #'clojure.core/record? in namespace: clojure.core.logic, being replaced by: #'clojure.core.logic/record?
Reflection warning, leiningen/voom.clj:184:3 - reference to field getBytes can't be resolved.
-- build-deps for mirkwood-jvm-common
install-versioned-artifact: [lein voom wrap :insanely-allow-dirty-working-copy :expected-version--20160315_163803-g725ade1 install] [:dir /home/smishra/.voom-repos/Z2l0QGdpdGh1Yi5jb206TG9ub0Nsb3VkL2Jlb3JuLmdpdA==/modules/mirkwood/jvm-common]
WARNING: record? already refers to: #'clojure.core/record? in namespace: clojure.core.logic, being replaced by: #'clojure.core.logic/record?
Reflection warning, leiningen/voom.clj:184:3 - reference to field getBytes can't be resolved.
Compiling lonocloud.beorn.mirkwood.types
Created /home/smishra/.voom-repos/Z2l0QGdpdGh1Yi5jb206TG9ub0Nsb3VkL2Jlb3JuLmdpdA==/modules/mirkwood/jvm-common/target/mirkwood-jvm-common-0.1.0-20160315_163803-g725ade1.jar
Wrote /home/smishra/.voom-repos/Z2l0QGdpdGh1Yi5jb206TG9ub0Nsb3VkL2Jlb3JuLmdpdA==/modules/mirkwood/jvm-common/pom.xml
Installed jar and pom into local repo.
Did not find, will build  {:groupId lonocloud.mirkwood, :artifactId mirkwood-jvm-common, :version 20160315_163803-g725ade1}
Calling recursive build-deps on: /home/smishra/.voom-repos/Z2l0QGdpdGh1Yi5jb206TG9ub0Nsb3VkL2Jlb3JuLmdpdA==/modules/mirkwood/jvm-common
WARNING: record? already refers to: #'clojure.core/record? in namespace: clojure.core.logic, being replaced by: #'clojure.core.logic/record?
Reflection warning, leiningen/voom.clj:184:3 - reference to field getBytes can't be resolved.
-- build-deps for mirkwood-jvm-common
install-versioned-artifact: [lein voom wrap :insanely-allow-dirty-working-copy :expected-version--20160315_163803-g725ade1 install] [:dir /home/smishra/.voom-repos/Z2l0QGdpdGh1Yi5jb206TG9ub0Nsb3VkL2Jlb3JuLmdpdA==/modules/mirkwood/jvm-common]
WARNING: record? already refers to: #'clojure.core/record? in namespace: clojure.core.logic, being replaced by: #'clojure.core.logic/record?
Reflection warning, leiningen/voom.clj:184:3 - reference to field getBytes can't be resolved.
Compiling lonocloud.beorn.mirkwood.types
Created /home/smishra/.voom-repos/Z2l0QGdpdGh1Yi5jb206TG9ub0Nsb3VkL2Jlb3JuLmdpdA==/modules/mirkwood/jvm-common/target/mirkwood-jvm-common-0.1.0-20160315_163803-g725ade1.jar
Wrote /home/smishra/.voom-repos/Z2l0QGdpdGh1Yi5jb206TG9ub0Nsb3VkL2Jlb3JuLmdpdA==/modules/mirkwood/jvm-common/pom.xml
Installed jar and pom into local repo.
Did not find, will build  {:groupId lonocloud.mirkwood, :artifactId mirkwood-jvm-common, :version 20160315_163803-g725ade1}
Calling recursive build-deps on: /home/smishra/.voom-repos/Z2l0QGdpdGh1Yi5jb206TG9ub0Nsb3VkL2Jlb3JuLmdpdA==/modules/mirkwood/jvm-common
WARNING: record? already refers to: #'clojure.core/record? in namespace: clojure.core.logic, being replaced by: #'clojure.core.logic/record?
Reflection warning, leiningen/voom.clj:184:3 - reference to field getBytes can't be resolved.
abrooks commented 8 years ago

This is a user error but we can help out in cases like this by checking that the expected group/artifact-version matches what lein voom install builds (ala. https://github.com/LonoCloud/lein-voom/blob/master/src/leiningen/voom.clj#L847)