reiddraper / simple-check

QuickCheck for Clojure
http://reiddraper.github.io/simple-check/
286 stars 18 forks source link

Could not locate cemerick/pprng.clj on classpath #53

Closed jstepien closed 10 years ago

jstepien commented 10 years ago

Having the 0.5.4 artifact in the classpath, an invocation of

(require 'simple-check.generators)

causes

FileNotFoundException Could not locate cemerick/pprng__init.class or
cemerick/pprng.clj on classpath:   clojure.lang.RT.load (RT.java:443)

Comparing simple-check.generators as of 0.5.3 and 0.5.4 shows that there's a newly added [cemerick.pprng :as pprng] in the require form, however com.cemerick/pprng is not in the classpath.

This makes it impossible to use the 0.5.4 artifact on JVM.

My suspicion is that cljx might be involved, since the ns form in the repository differs from the one in the artifact.

Let me know if there's any additional information I could provide to help you to solve this problem.

cemerick commented 10 years ago

simple-check does not use pprng; are you actually trying to use double-check?

jstepien commented 10 years ago

I'm next to certain that I'm trying to use simple-check. Correct me if I'm wrong, please.

$ wget https://clojars.org/repo/reiddraper/simple-check/0.5.4/simple-check-0.5.4.jar && \
    unzip -q -c simple-check-0.5.4.jar simple_check/generators.clj | head
(ns simple-check.generators
  (:require [cemerick.pprng :as pprng]
            clojure.string)
  (:refer-clojure :exclude [int vector list hash-map map keyword
                            char boolean byte bytes sequence
                            not-empty]))
cemerick commented 10 years ago

Whoa, you're right.

@reiddraper, I think you released from the wrong local branch or something. simple-check 0.5.4 definitely contains code produced by the cljx transform. e.g. the ns form for simple-check.generators on master right now:

(ns simple-check.generators
  (:import java.util.Random)
  (:refer-clojure :exclude [int vector list hash-map map keyword
                            char boolean byte bytes sequence
                            not-empty]))

and the same namespace's ns declaration in the 0.5.4 artifact:

(ns simple-check.generators
  (:require [cemerick.pprng :as pprng]
            clojure.string)
  (:refer-clojure :exclude [int vector list hash-map map keyword
                            char boolean byte bytes sequence
                            not-empty]))

The latter is totally from my early work on #11, which turned into double-check. I think it's time to release 0.5.5. :-)

reiddraper commented 10 years ago

Not sure how this happened, but I've pushed a fixed release as 0.5.5. I've checked it using the method you reported. Thanks for digging into this!

jstepien commented 10 years ago

Great, 0.5.5 works like a charm. I'm happy I could have helped. Cheers and keep up the good work!

reiddraper commented 10 years ago

No problem, and thanks.