piranha / pump

Pump your REACTive app with fuel
Eclipse Public License 1.0
75 stars 5 forks source link

Error when compiling #8

Open tomconnors opened 10 years ago

tomconnors commented 10 years ago

I'm trying to play around with this but my cljs won't build once I require pump. I see this error: java.lang.IllegalArgumentException: No implementation of method: :make-reader of protocol: #'clojure.java.io/IOFactory found for class: nil

Any idea what that's about?

piranha commented 10 years ago

That is new, never seen such an exception. What's the version of ClojureScript you're using? I'll try to compile my app with current cljs a bit later as well.

tomconnors commented 10 years ago

I'm using the most recent, [org.clojure/clojurescript "0.0-2030"]. After playing around with the project a bit, it's definitely related to the module$React stuff. If I remove the (:require [module$React :as React]) declarations, and just reference a globally scoped instance of React, I don't have any issues. I'm assuming you have those modules there in an effort to get react working with advanced compilation? If that's what's going on, let me know what I can do to help out. After playing with React and pump last night, I'm very impressed with the whole thing, so I'd like to contribute what I can to make it easier to use.

piranha commented 10 years ago

Yeah, that's mostly about advanced compilation. I really need to push out all the stuff that's been sitting on my disk for a month, I've been distracted a bit. I'll have a bit of time today in the evening so I will push whatever I can and see what's up with advanced compilation right now. :)

tomconnors commented 10 years ago

That sounds great. Once I see the new commit I'll pull it in and test it out. Thank you!

geraldodev commented 10 years ago

Alexander,

Question about compilation: When I use the foreign-libs clause like the main page advises I get following compilation error:

Compiling "resources/public/copweb.js" failed. java.lang.IllegalArgumentException: No implementation of method: :make-reader of protocol: #'clojure.java.io/IOFactory found for class: nil

Note that I think it's not related to compilation mode because I'm using :optimizations :none. To solve the problem I comment the foreign-libs clause.

I'm using the 2030 cljs, and requiring react as a script tag at the main page.

When I first read the foreign-libs documentation I got the impression the I had not to include it at main page manually, but I searched the main js file and failed to see how foreign-libs bundle the library.

Is that normal ?

references:

http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html http://hugoduncan.org/post/clojurescript-libs-with-js-dependencies/

Forgot to mention I'm using cljsbuild 1.0.0 and pump 0.4.3

piranha commented 10 years ago

If I understand correctly, only :libs will join a lib to your code. In case of :foreign-libs you're only indicating that you are using something from the side. My memory is a bit blurry though - all those options were not obvious (and I didn't get time in a last few days to look at the code). I still hope to bring everything up to date and make stuff work properly, it shouldn't be much more work (I've got React compiled in advanced mode and joined together with CLJS output).