arohner / scriptjure

a Clojure library for generating javascript
187 stars 15 forks source link

Scriptjure requires clojure.contrib.string which is not available in Clojure 1.2.0 #5

Closed alienscience closed 14 years ago

alienscience commented 14 years ago

;; Using Clojure 1.2 RC3

user> (use 'com.reasonr.scriptjure)

Could not initialize class clojure.contrib.string__init [Thrown class java.lang.NoClassDefFoundError]

I believe this is because Clojure 1.2 has moved string utilities to clojure.string.

Many thanks for such a useful library. Saul

arohner commented 14 years ago

Clojure 1.2 moved some functions into clojure.string, but there are still functions in contrib.string left, that scriptjure uses.

I've bumped the versions to 1.2.0, and made sure scriptjure uses the clojure.string version of a function when appropriate. Make sure you have contrib-1.2, and see if that works for you.

Thanks for the report, Allen

alienscience commented 14 years ago

Thanks for making the changes. The version on github works fine for me (I actually hadn't checked that before).

However, the version (0.1.12) on Clojars gives me the following error:

user> (use 'com.reasonr.scriptjure)

 Could not initialize class clojure.contrib.string__init
  [Thrown class java.lang.NoClassDefFoundError]

I looked at the jar file on clojars and it has the following project.clj:

(defproject scriptjure "0.1.12"
   :description "a clojure DSL for generating javascript"
   :url "http://github.com/arohner/scriptjure"
   :dependencies [[org.clojure/clojure "1.2.0-RC3"]
                        [org.clojure/clojure-contrib "1.2.0-RC2"]])

Could it be the RC2/RC3 mismatch that is causing the problem? Anyway, I'm fine with the github version for now.

Many thanks Saul

alienscience commented 14 years ago

Actually, I think this may be a problem with my project which has a mix of dependencies that require Clojure 1.1 and 1.2. Please ignore this report for now.

I'm hope I didn't waste too much of your time. Saul