librelist archives

« back to archive

Changed behavior between preview10 and RC1/2

Changed behavior between preview10 and RC1/2

From:
Brian Marick
Date:
2013-01-14 @ 02:23
A user reported that `lein midje` failed on RC1. I've been using 
preview10, which worked. When I `lein upgraded` to RC2, I got the same 
failure.

Here's a project.clj for some project that uses Midje:

(defproject scratch "1.0.0-SNAPSHOT"
  :description "FIXME: write"
  :dependencies [[org.clojure/clojure "1.4.0"]
                 [midje "1.4.0"]
                 [lein-midje "2.0.4"]])

In preview10, `lein midje` worked. In RC2, it fails like this:

Exception in thread "main" java.io.FileNotFoundException: Could not locate
bultitude/core__init.class or bultitude/core.clj on classpath

`bultitude` is a dependency of Midje's. The problem can be fixed by adding
it to the using project's `project.clj`:

(defproject scratch "1.0.0-SNAPSHOT"
  :description "FIXME: write"
  :dependencies [[org.clojure/clojure "1.4.0"]
                 [midje "1.4.0"]
                 [bultitude "0.1.7"]    ; <=======
                 [lein-midje "2.0.4"]])

Does anyone know what's going on?

--------
Occasional consulting on programming technique
Contract programming in Ruby and Clojure
Latest book: /Functional Programming for the Object-Oriented Programmer/
https://leanpub.com/fp-oo

Re: [leiningen] Changed behavior between preview10 and RC1/2

From:
Brian Marick
Date:
2013-01-14 @ 02:40
On Jan 13, 2013, at 8:23 PM, Brian Marick <marick@exampler.com> wrote:

> A user reported that `lein midje` failed on RC1. I've been using 
preview10, which worked. When I `lein upgraded` to RC2, I got the same 
failure.


Related to the previous, I have a similar-but-different problem with a 
later version of `lein-midje`. Before I upgraded, the following project 
file worked:

> (defproject scratch "1.0.0-SNAPSHOT"
>   :description "FIXME: write"
>   :dependencies [[org.clojure/clojure "1.4.0"]
>                  [midje "1.5-alpha5"]
>                  [lein-midje "3.0-alpha1"]])

But, under RC2, running `lein midje` on a (trivial) project, gets me this:

> 2873 $ lein midje
> Exception in thread "main" java.io.FileNotFoundException: Could not 
locate leinmidje/midje_color__init.class or leinmidje/midje_color.clj on 
classpath: 


This is interesting for two reasons:

1. "leinmidje"? Where does that come from? There is no such text in the source.

2. The word "color" does not appear anywhere in the lein-midje source. 
There *is* a use of that word in the Midje source:

	(:require [midje.util.colorize :as color]

… but there's no place where I can see that there's anything that could 
turn into "midje_color". 

You can find `lein midje` source here:
https://github.com/marick/lein-midje


--------
Occasional consulting on programming technique
Contract programming in Ruby and Clojure
Latest book: /Functional Programming for the Object-Oriented Programmer/
https://leanpub.com/fp-oo

Re: [leiningen] Changed behavior between preview10 and RC1/2

From:
Phil Hagelberg
Date:
2013-01-16 @ 18:55
Sean Corfield writes:

> I'm able to run lein midje with lein 2 RC2 but I have:
>
> :plugins [[lein-midje "3.0-alpha1"]]
> :dependencies [[org.clojure/clojure "1.4.0"]
>         [midje "1.5-alpha5"]]
>
> Could you try putting lein-midje under plugins instead of dependencies?

From reports I heard on IRC, prior to 1.5 midje omitted to declare the
dependency on Bultitude, and a bug in Leiningen (fixed in the RC) caused
Leiningen's copy of Bultitude to leak onto the project classpath. So the
fix is either to upgrade to a version of midje with the correct
:dependencies or add bultitude to :dependencies in your own project.clj.

-Phil

Re: [leiningen] Changed behavior between preview10 and RC1/2

From:
Sean Corfield
Date:
2013-01-14 @ 03:06
I'm able to run lein midje with lein 2 RC2 but I have:

:plugins [[lein-midje "3.0-alpha1"]]
:dependencies [[org.clojure/clojure "1.4.0"]
        [midje "1.5-alpha5"]]

Could you try putting lein-midje under plugins instead of dependencies?

Sean

On Sun, Jan 13, 2013 at 6:40 PM, Brian Marick <marick@exampler.com> wrote:
>
> On Jan 13, 2013, at 8:23 PM, Brian Marick <marick@exampler.com> wrote:
>
>> A user reported that `lein midje` failed on RC1. I've been using 
preview10, which worked. When I `lein upgraded` to RC2, I got the same 
failure.
>
>
> Related to the previous, I have a similar-but-different problem with a 
later version of `lein-midje`. Before I upgraded, the following project 
file worked:
>
>> (defproject scratch "1.0.0-SNAPSHOT"
>>   :description "FIXME: write"
>>   :dependencies [[org.clojure/clojure "1.4.0"]
>>                  [midje "1.5-alpha5"]
>>                  [lein-midje "3.0-alpha1"]])
>
> But, under RC2, running `lein midje` on a (trivial) project, gets me this:
>
>> 2873 $ lein midje
>> Exception in thread "main" java.io.FileNotFoundException: Could not 
locate leinmidje/midje_color__init.class or leinmidje/midje_color.clj on 
classpath:
>
>
> This is interesting for two reasons:
>
> 1. "leinmidje"? Where does that come from? There is no such text in the source.
>
> 2. The word "color" does not appear anywhere in the lein-midje source. 
There *is* a use of that word in the Midje source:
>
>         (:require [midje.util.colorize :as color]
>
> … but there's no place where I can see that there's anything that could 
turn into "midje_color".
>
> You can find `lein midje` source here:
> https://github.com/marick/lein-midje
>
>
> --------
> Occasional consulting on programming technique
> Contract programming in Ruby and Clojure
> Latest book: /Functional Programming for the Object-Oriented Programmer/
> https://leanpub.com/fp-oo
>



-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)