【问题标题】:LightTable not connecting/evalling a Clojure projectLightTable 未连接/评估 Clojure 项目
【发布时间】:2013-09-30 10:21:11
【问题描述】:

刚刚开始一个新的 Clojure 项目并遇到了一些问题,让 LightTable 能够正常运行。应用程序/REPL 与 lein ring server / lein repl 等一起正常运行,但尝试连接到 LightTable 中的任何文件只会让蓝色微调器保持…旋转…即使它说它已连接。

这些是我的部门(使用 LightTable 1.5.4 - 刚刚从 1.4.something 更新,它正在做同样的事情)

(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"]]}})

有问题的文件是

(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!

然后我尝试摆脱所有需要的调试等,所以我有一个新文件

(ns clollo.ihopethisworks)

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

有什么想法吗?正如我所说,LightTable 的InstaRepl 本身工作正常,LightTable 正在在连接窗口中连接到该项目的project.clj。当它试图评估任何东西时只是旋转。

谢谢!

【问题讨论】:

    标签: clojure leiningen lighttable


    【解决方案1】:

    通过测试您的示例代码,看起来 handler.clj 文件中的 [trello.core] 要求项导致了问题。该库似乎在 Light Table 中初始化 clj-http 时遇到问题。

    此外,LT v0.5.x 还存在一个问题,在某些情况下,工作指示器会在操作完成后继续旋转。您可以使用Statusbar: Reset working indicator 命令来停止它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-19
      • 1970-01-01
      • 2023-03-13
      • 2018-04-03
      • 2011-03-03
      • 1970-01-01
      相关资源
      最近更新 更多