Managed to figure out the culprit with some help from IRC. I was attempting to use cljs-http "0.1.10" with clojurescript "0.0-2173" (for lighttable compat). By swapping to using "0.1.8" of cljs-http, it worked perfectly.
I assumed that leiningen would alert me that I had dependency mismatches, but it appears with the default settings it doesn't throw a red flag. I would love to hear if there is a way to change that so things don't go pow without warning; however, I did find that grepping through the output of lein deps :tree for "overrides" is a good way to detect collisions in the meantime. As an aside, I think I will be trying out SublimeText w/ SublimeREPL until LightTable fixes its dependence on an increasingly old release of clojurescript. -Joseph On Sunday, May 18, 2014 2:43:58 PM UTC-4, Joseph Rollins wrote: > > I'm having some trouble with what should be a trivial application of > core.async and cljs-http. I have tried to debug it, but I don't have a > great setup for properly debugging. Also, debugging core.async channels is > well above my current ability. > > I've whittled the code down to the least common denominator. The code is > pasted below as well as available here: https://www.refheap.com/85610. > > (ns shouter.core > (:require-macros [cljs.core.async.macros :refer [go]]) > (:require [om.core :as om :include-macros true] > [om.dom :as dom :include-macros true] > [cljs-http.client :as http] > [cljs.core.async :refer [>! <! chan put!]])) > > (enable-console-print!) > > (def app-state (atom {:shouts [{:shout "shout 1"}{:shout "shout 2"}]})) > > (defn- fetch-shouts [page] > (let [c (chan)] > (go (let [response (<! (http/get "http://google.com"))] > (>! c response))) > c)) > > (defn shouts-view [app owner] > (reify > om/IWillMount > (will-mount [_] > (go (let [shouts (<! (fetch-shouts 1))] > (prn shouts)))) > om/IRender > (render [_] > (apply dom/ul nil > (map #(dom/li nil (:shout %)) (:shouts app)))))) > > (om/root > shouts-view > app-state > {:target (. js/document (getElementById "container"))}) > > > The error I'm getting is: > > > 1. Uncaught TypeError: undefined is not a function core.cljs:33 > 1. requestcore.cljs:33 > 2. cljs_http.client.wrap_edn_paramsclient.cljs:65 > 3. > > cljs_http.client.wrap_edn_response.cljs.core.async.impl.dispatch.run.call.switch__6217__auto__ > client.cljs:72 > 4. (anonymous function)client.cljs:72 > 5. > > cljs_http.client.wrap_edn_response.cljs.core.async.impl.dispatch.run.call.state_machine__6218__auto____1 > client.cljs:72 > 6. > > cljs_http.client.wrap_edn_response.cljs.core.async.impl.dispatch.run.call.state_machine__6218__auto__ > client.cljs:72 > 7. run_state_machineioc_helpers.cljs:34 > 8. run_state_machine_wrappedioc_helpers.cljs:38 > 9. (anonymous function)client.cljs:72 > 10. process_messagesdispatch.cljs:19 > 11. cljs.core.async.impl.dispatch.message_channel.port1.onmessage > > > Any help would be greatly appreciated. I am trying to tie together a light > restful service backend to a heavy client frontend with Om. It has been > really fun so far, but running into snags like above is really putting a > damper on things. > > Regards, > Joseph > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.