marick / lein-midje

Leiningen plugin for Midje
MIT License
77 stars 29 forks source link

ClassNotFoundException: clojure.set #3

Closed andeee closed 12 years ago

andeee commented 12 years ago

same as Midje Issue 49, but the root cause lies here in lein-midje

The explanation for this is simple, clojure.set is no longer loaded at startup since Clojure 1.3, see also ChangeLog for Clojure 1.3

To fix it I simply added the set namespace to init parameter of eval-in-project.

marick commented 12 years ago

I merged your pull request, pushed lein-midje 1.0.4 to clojars. I install it with

lein plugin install lein-midje 1.0.4

Now I get this:

504 $ lein midje
That's not a task. Use "lein help" to list all tasks.

Hard to see how that could make a difference, but could you try it on your machine?

I'm using leiningen 1.6.1.1.

andeee commented 12 years ago

Works for me on 2 different machines:

d:/dev $ lein new test-midje
Created new project in: d:\dev\test-midje
d:/dev $ cd test-midje/
d:/dev/test-midje $ lein midje
Copying 1 file to d:\dev\test-midje\lib
>>> Output from clojure.test tests:
FAIL in (replace-me) (core.clj:6)
No tests have been written.
expected: false
  actual: false
>>> clojure.test summary:
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
>>> Midje summary:
All claimed facts (0) have been confirmed.
andreas@DevUbuntu:~$ lein new test-midje
Created new project in: /home/andreas/test-midje
andreas@DevUbuntu:~$ cd test-midje/
andreas@DevUbuntu:~/test-midje$ lein midje
Copying 1 file to /home/andreas/test-midje/lib
>>> Output from clojure.test tests:
FAIL in (replace-me) (core.clj:6)
No tests have been written.
expected: false
  actual: false
>>> clojure.test summary:
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
>>> Midje summary:
All claimed facts (0) have been confirmed.

Do you have different versions of lein-midje in your leiningen plugins folder?

marick commented 12 years ago

Do you have both 1.0.3 and 1.0.4 in ~/.lein/plugins? If so, that's odd. When I have both of them in there, I get the problem. Here's something I sent to the leiningen mailing list:

TL;DR: Why doesn't having two versions of my plugin in the plugins directory work? Other plugins with two versions works fine.

I have these plugins:

lein-midje-1.0.3.jar
lein-midje-1.0.4.jar
lein-noir-1.0.0.jar lein-noir-1.1.0-SNAPSHOT.jar

If I say lein noir it works (and I trust picks the later version). noir also appears in the lein help list.

If I say lein midje it does not, nor does midje appear in the lein help list.

The issue is that the (require 'leiningen.midje) in core.clj's resolve-task is blowing up with this:

"Could not locate leiningen/midje__init.class or leiningen/midje.clj on classpath: "

If I remove either version of lein-midje from the plugins directory, the require locates the jar file.

Version of Leiningen is 1.6.1.1, though I can't see how that would matter.

On Sep 27, 2011, at 4:08 AM, Andreas Wurzer wrote:

Works for me on 2 different machines:

  • Leiningen 1.6.1.1 on Java 1.7.0 Java HotSpot(TM) Client VM - Windows 7 SP1 64-bit
d:/dev $ lein new test-midje
Created new project in: d:\dev\test-midje
d:/dev $ cd test-midje/
d:/dev/test-midje $ lein midje
Copying 1 file to d:\dev\test-midje\lib
>>> Output from clojure.test tests:
FAIL in (replace-me) (core.clj:6)
No tests have been written.
expected: false
 actual: false
>>> clojure.test summary:
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
>>> Midje summary:
All claimed facts (0) have been confirmed.
  • Leiningen 1.6.1.1 on Java 1.6.0_20 OpenJDK 64-Bit Server VM - Ubuntu 10.10 64-bit
andreas@DevUbuntu:~$ lein new test-midje
Created new project in: /home/andreas/test-midje
andreas@DevUbuntu:~$ cd test-midje/
andreas@DevUbuntu:~/test-midje$ lein midje
Copying 1 file to /home/andreas/test-midje/lib
>>> Output from clojure.test tests:
FAIL in (replace-me) (core.clj:6)
No tests have been written.
expected: false
 actual: false
>>> clojure.test summary:
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
>>> Midje summary:
All claimed facts (0) have been confirmed.

Do you have different versions of lein-midje in your leiningen plugins folder?

Reply to this email directly or view it on GitHub: https://github.com/marick/lein-midje/pull/3#issuecomment-2208803


Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile

andeee commented 12 years ago

No, I just have 1.0.4.

It was just my guess that you have multiple versions, since I remember there's also a problem with multiple versions of swank-clojure and leiningen - Found something about here: Known Issues in swank-clojure README

Am 27.09.2011 um 18:53 schrieb Brian Marickreply@reply.github.com:

Do you have both 1.0.3 and 1.0.4 in ~/.lein/plugins? If so, that's odd. When I have both of them in there, I get the problem. Here's something I sent to the leiningen mailing list:

TL;DR: Why doesn't having two versions of my plugin in the plugins directory work? Other plugins with two versions works fine.

I have these plugins:

lein-midje-1.0.3.jar
lein-midje-1.0.4.jar
lein-noir-1.0.0.jar
lein-noir-1.1.0-SNAPSHOT.jar

If I say lein noir it works (and I trust picks the later version). noir also appears in the lein help list.

If I say lein midje it does not, nor does midje appear in the lein help list.

The issue is that the (require 'leiningen.midje) in core.clj's resolve-task is blowing up with this:

"Could not locate leiningen/midje__init.class or leiningen/midje.clj on classpath: "

If I remove either version of lein-midje from the plugins directory, the require locates the jar file.

Version of Leiningen is 1.6.1.1, though I can't see how that would matter.

On Sep 27, 2011, at 4:08 AM, Andreas Wurzer wrote:

Works for me on 2 different machines:

  • Leiningen 1.6.1.1 on Java 1.7.0 Java HotSpot(TM) Client VM - Windows 7 SP1 64-bit
d:/dev $ lein new test-midje
Created new project in: d:\dev\test-midje
d:/dev $ cd test-midje/
d:/dev/test-midje $ lein midje
Copying 1 file to d:\dev\test-midje\lib
>>> Output from clojure.test tests:
FAIL in (replace-me) (core.clj:6)
No tests have been written.
expected: false
actual: false
>>> clojure.test summary:
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
>>> Midje summary:
All claimed facts (0) have been confirmed.
  • Leiningen 1.6.1.1 on Java 1.6.0_20 OpenJDK 64-Bit Server VM - Ubuntu 10.10 64-bit
andreas@DevUbuntu:~$ lein new test-midje
Created new project in: /home/andreas/test-midje
andreas@DevUbuntu:~$ cd test-midje/
andreas@DevUbuntu:~/test-midje$ lein midje
Copying 1 file to /home/andreas/test-midje/lib
>>> Output from clojure.test tests:
FAIL in (replace-me) (core.clj:6)
No tests have been written.
expected: false
actual: false
>>> clojure.test summary:
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
>>> Midje summary:
All claimed facts (0) have been confirmed.

Do you have different versions of lein-midje in your leiningen plugins folder?

Reply to this email directly or view it on GitHub: https://github.com/marick/lein-midje/pull/3#issuecomment-2208803


Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile

Reply to this email directly or view it on GitHub: https://github.com/marick/lein-midje/pull/3#issuecomment-2213219

marick commented 12 years ago

OK. I'll release as is and make a note to about the possible need to uninstall 1.0.3.

On Sep 27, 2011, at 12:20 PM, Andreas Wurzer wrote:

No, I just have 1.0.4.

It was just my guess that you have multiple versions, since I remember there's also a problem with multiple versions of swank-clojure and leiningen - Found something about here: Known Issues in swank-clojure README

Am 27.09.2011 um 18:53 schrieb Brian Marickreply@reply.github.com:

Do you have both 1.0.3 and 1.0.4 in ~/.lein/plugins? If so, that's odd. When I have both of them in there, I get the problem. Here's something I sent to the leiningen mailing list:

TL;DR: Why doesn't having two versions of my plugin in the plugins directory work? Other plugins with two versions works fine.

I have these plugins:

lein-midje-1.0.3.jar
lein-midje-1.0.4.jar
lein-noir-1.0.0.jar
lein-noir-1.1.0-SNAPSHOT.jar

If I say lein noir it works (and I trust picks the later version). noir also appears in the lein help list.

If I say lein midje it does not, nor does midje appear in the lein help list.

The issue is that the (require 'leiningen.midje) in core.clj's resolve-task is blowing up with this:

"Could not locate leiningen/midje__init.class or leiningen/midje.clj on classpath: "

If I remove either version of lein-midje from the plugins directory, the require locates the jar file.

Version of Leiningen is 1.6.1.1, though I can't see how that would matter.

On Sep 27, 2011, at 4:08 AM, Andreas Wurzer wrote:

Works for me on 2 different machines:

  • Leiningen 1.6.1.1 on Java 1.7.0 Java HotSpot(TM) Client VM - Windows 7 SP1 64-bit
d:/dev $ lein new test-midje
Created new project in: d:\dev\test-midje
d:/dev $ cd test-midje/
d:/dev/test-midje $ lein midje
Copying 1 file to d:\dev\test-midje\lib
>>> Output from clojure.test tests:
FAIL in (replace-me) (core.clj:6)
No tests have been written.
expected: false
actual: false
>>> clojure.test summary:
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
>>> Midje summary:
All claimed facts (0) have been confirmed.
  • Leiningen 1.6.1.1 on Java 1.6.0_20 OpenJDK 64-Bit Server VM - Ubuntu 10.10 64-bit
andreas@DevUbuntu:~$ lein new test-midje
Created new project in: /home/andreas/test-midje
andreas@DevUbuntu:~$ cd test-midje/
andreas@DevUbuntu:~/test-midje$ lein midje
Copying 1 file to /home/andreas/test-midje/lib
>>> Output from clojure.test tests:
FAIL in (replace-me) (core.clj:6)
No tests have been written.
expected: false
actual: false
>>> clojure.test summary:
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
>>> Midje summary:
All claimed facts (0) have been confirmed.

Do you have different versions of lein-midje in your leiningen plugins folder?

Reply to this email directly or view it on GitHub: https://github.com/marick/lein-midje/pull/3#issuecomment-2208803


Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile

Reply to this email directly or view it on GitHub: https://github.com/marick/lein-midje/pull/3#issuecomment-2213219

Reply to this email directly or view it on GitHub: https://github.com/marick/lein-midje/pull/3#issuecomment-2213512


Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile