Skip to content

clj-minecraft + Light Table -> crash #46

Description

@slaf4

I am trying to modify clj-minecraft to use it with Light Table nREPL by using the instructions of this link: http://manuelp.herokuapp.com/category/nrepl.

To have a LT-aware nREPL server, we have first to add a dependency to the LT middleware in project.clj

(defproject cljminecraft “1.0.6-SNAPSHOT”
:description “Clojure for Bukkit Minecraft”
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/tools.logging "0.2.6"]
[org.clojure/tools.nrepl "0.2.3"]
[org.bukkit/bukkit "1.6.4-R2.0"]
[clojure-complete "0.2.3"]
[cheshire "5.2.0"]
[org.reflections/reflections "0.9.8"]
[lein-light-nrepl "0.0.15"]] <———————– LT dependency
:profiles {:dev {:dependencies []}}
:javac-options [ "-d" "classes/" "-source" "1.6" "-target" "1.6"]
:java-source-paths ["javasrc"]
:uberjar-exclusions [#"(org|com|gnu)//"

"com[/]google[/]common/"

"org[/]apache[/]commons/"

"javax[/]persistence/"

"net[/]sf[/]cglib/"]

:repositories [["bukkit.snapshots" "http://repo.bukkit.org/content/repositories/snapshots"%5D
["bukkit.release" "http://repo.bukkit.org/content/repositories/releases"%5D%5D
)
-> After adding this dependency, if I ‘lein uberjar’, copy ‘cljminecraft-1.0.6-SNAPSHOT-standalone’ in the plugins and restart ‘craftbukkit-1.7.2-R0.2 Beta’ server, the clojure plugin is not crashing but to connect LT to the plugin, we have to also add the middlewares chains in the code:
(ns cljminecraft.core
(:require [cljminecraft.bukkit :as bk]
[cljminecraft.blocks :as blocks]
[cljminecraft.events :as ev]
[cljminecraft.entity :as ent]
[cljminecraft.player :as plr]
[cljminecraft.util :as util]
[cljminecraft.logging :as log]
[cljminecraft.config :as cfg]
[cljminecraft.commands :as cmd]
[cljminecraft.recipes :as r]
[cljminecraft.items :as i]
[cljminecraft.files]
[clojure.tools.nrepl.server :refer (start-server stop-server)]
[lighttable.nrepl.handler :refer [lighttable-ops]] <———— middlewares chains
))
After adding the middlewares chains in the code, I did ‘lein uberjar’, copied ‘cljminecraft-1.0.6-SNAPSHOT-standalone’ in the plugins and restarted the ‘craftbukkit-1.7.2-R0.2 Beta’ server. Doing that I got the message ‘Something broke setting up Clojure’ -> clojure in the crafbukkit server crashed.

I use LightTable 0.6.2. (0.8.4). I am just starting to learn clojure and Light Table and I am not a professional programmer, so I am probably missing something obvious.. Any idea how I can troubleshoot that?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions