avescodes / lein-try

A Leiningen plugin for trying out new libraries
313 stars 13 forks source link

Plugin does not work with riemann-clojure-client #17

Closed kumarshantanu closed 10 years ago

kumarshantanu commented 10 years ago

When I use lein-try with riemann-clojure-client it produces error:

$ lein try riemann-clojure-client 0.2.9
user=> (use 'riemann.client)

VerifyError class com.aphyr.riemann.Proto$Msg overrides final method getUnknownFields.()Lcom/google/protobuf/UnknownFieldSet;  java.lang.ClassLoader.defineClass1 (ClassLoader.java:-2)

This does not happen when using lein repl when the library is part of project.clj dependencies.

xsc commented 10 years ago

Can you supply the output of lein version, please? I cannot reproduce that error here on my machine.

kumarshantanu commented 10 years ago

Sure, I am on 64-bit Ubuntu.

$ lein version
Leiningen 2.3.4 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VM
xsc commented 10 years ago

I have exactly the same setup (regarding Leiningen, Ubuntu and Java versions) and I don't experience any problems:

$ lein version
Leiningen 2.3.4 on Java 1.7.0_45 Java HotSpot(TM) 64-Bit Server VM
$ lein try riemann-clojure-client 0.2.9
user=> (use 'riemann.client)
nil

Are you inside a project or outside? And if the former, can you give the project.clj?

kumarshantanu commented 10 years ago

I am not inside any project.

kumarshantanu commented 10 years ago

Found the cause. It was happening due to https://github.com/jaley/cloc 0.1.0 in my ~/lein/profiles.clj -- maybe @jaley would know what's going on. When I commented out cloc, the error went away.

avescodes commented 10 years ago

@kumarshantanu Hmm, yes, it does look like cloc changes the project map under the hood. I'm inclined to point a finger at cloc as lein-try is only addititive to the project map, while it looks like cloc has some business with creating a new project.