1
votes

Just starting a new Clojure project and running into some issues getting LightTable to play nicely. The app/REPL spin up fine with lein ring server / lein repl etc, but trying to connect to any file in LightTable just keeps the blue spinner…spinning…even after it says it's connected.

These are my deps (with LightTable 1.5.4 - just updated from 1.4.something which was doing the same thing)

(defproject clollo "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [compojure "1.1.5"]
                 [trello "0.1.1-SNAPSHOT"]]
  :plugins [[lein-ring "0.8.5"]]
  :ring {:handler clollo.handler/app}
  :profiles
  {:dev {:dependencies [[ring-mock "0.1.5"]]}})

Files in question are

(ns clollo.handler
  (:use compojure.core)
  (:require [compojure.handler :as handler]
            [compojure.route :as route]
            [trello.core]))

(defroutes app-routes
  (GET "/" [] "Hello Wo1rld")
  (route/resources "/")
  (route/not-found "Not Found"))

(def app
  (handler/site app-routes))

(+ 1 1) ;; test LightTable eval!

I then tried getting rid of all the requires etc for debugging, so I have a new file

(ns clollo.ihopethisworks)

(+ 1 1) ;; this doesn't work either

Any ideas? As I say, LightTable's InstaRepl works fine on its own, and LightTable is connecting to this project's project.clj in the connect window. Just spinning when it tries to eval anything.

Thanks!

1

1 Answers

2
votes

From testing your sample code, it looks like the [trello.core] require item, in the handler.clj file, is causing the issue. The library seems to have an issue with initializing clj-http in Light Table.

Also, there is an issue, with LT v0.5.x, where the working indicator, in some cases, keeps spinning after the operation is complete. You can use the Statusbar: Reset working indicator command to stop it.