This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-13
Channels
- # aleph (8)
- # announcements (3)
- # beginners (36)
- # calva (1)
- # cider (1)
- # circleci (3)
- # clj-kondo (9)
- # cljdoc (58)
- # clojars (7)
- # clojure (70)
- # clojure-europe (13)
- # clojure-japan (1)
- # clojure-nl (8)
- # clojure-russia (2)
- # clojure-uk (7)
- # clojuredesign-podcast (4)
- # clojurescript (67)
- # clojureverse-ops (14)
- # cursive (6)
- # data-science (1)
- # datahike (3)
- # datomic (6)
- # docker (1)
- # events (2)
- # figwheel-main (9)
- # fulcro (4)
- # graalvm (33)
- # graphql (8)
- # helix (1)
- # jobs (1)
- # leiningen (3)
- # lsp (39)
- # malli (9)
- # minecraft (31)
- # nextjournal (7)
- # off-topic (6)
- # portal (22)
- # re-frame (5)
- # reitit (5)
- # remote-jobs (1)
- # shadow-cljs (55)
- # sql (22)
- # tools-build (3)
- # tools-deps (4)
- # xtdb (6)
does anyone have experience with https://github.com/lambdaisland/witchcraft?
I was trying to follow the https://github.com/lambdaisland/witchcraft/blob/main/doc/witchcraft_manual.org#running-from-the-repl to get a locally running glowstone server running in my repl, which I was able to do, but it seems like the published jar is pretty out of date. for instance, the block
function doesn’t exist, which is the next thing that the manual goes over after getting the server up:
> (wc/block [0 0 0])
Syntax error compiling at (/private/var/folders/vg/zw2xmz2n5tn995hr3nd93h180000gp/T/form-init8340767686230672678.clj:1:1).
No such var: wc/block
currently, my deps.edn
looks like
{:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.10.3"}
com.lambdaisland/witchcraft {:mvn/version "0.0.28"}}
:mvn/repos {"glowstone-repo" {:url " "}
"aikar" {:url " "}}}
but should I be relying on the github source rather than the packaged jar to be getting everything up and running?
com.lambdaisland/witchcraft {:git/url ""
:git/sha "12edfe88f0753909e2d7123f4de540d33d1d90a8"}
any experienced opinions or help on this would be great thanks!Hey @jkent, you came to the right place! Really happy to hear you're trying out witchcraft. The manual is indeed out of date, hoping to give it a big overhaul soon.
oh I see the released version is pretty old, let me cut a new release. At the moment you're generally best of just taking the latest commit on main
New release:
[com.lambdaisland/witchcraft "0.3.90"]
{com.lambdaisland/witchcraft {:mvn/version "0.3.90"}}
have you found https://github.com/lambdaisland/witchcraft-plugin as well? this is now the recommended way to get started, you can add this to any Glowstone, Spigot, or Paper server
I think you'll need to add the Glowstone dependency as well if you want to run Glowstone from your REPL:
let me know if you get things running, after that you should probably just start looking at some example code. There are a few things under lambdaisland.witchcraft.gallery.*
, these are "official" examples which we'll make sure remain up to date and functional. Then there's much more stuff of just me experimenting under repl_sessions
, or in my own witchcraft experiments repo cauldron https://github.com/plexus/cauldron
@plexus I appreciate the help and thanks for releasing the new version! this is my updated deps.edn
, you should notice I needed to update the glowstone repo release repository to point it as releases rather than snapshots as stated in the docs
{:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.10.3"}
com.lambdaisland/witchcraft {:mvn/version "0.3.90"}
net.glowstone/glowstone {:mvn/version "2021.8.0"}}
:mvn/repos {"glowstone-repo" {:url " "}
"aikar" {:url " "}}}
unfortunately, I’m now encountering an error when I require witchcraft
> (require '[lambdaisland.witchcraft :as wc])
WARNING: bean already refers to: #'clojure.core/bean in namespace: lambdaisland.witchcraft, being replaced by: #'lambdaisland.witchcraft.safe-bean/bean
Syntax error (ClassNotFoundException) compiling at (lambdaisland/witchcraft.clj:1:1).
org.bukkit.GameRule
I see that you now have support for starting paper as well as glowstone in the repl. do I need the paper deps too?also, it sounds like you recommend running the server outside of the repl and adding the plugin instead. I can move in that direction but I was just hoping I could get this working first
yeah I see what's happening, haven't tested with Glowstone in a while. In principle we rely on Bukkit being a shared interface/API, but in this case I suppose Glowstone does not have all the bukkit stuff that paper has. I'll have to fix that, we should stick to the largest common denominator, and detect the rest dynamically
or, probably more accurately this version of Glowstone does not yet have this particular Bukkit class
if you're coming from a Clojure perspective I understand that it seems much more appealing running things inside your REPL rather than running a separate server, that was also my starting point and why I went initially with Glowstone
but Glowstone is in this annoying limbo state where the last stable version is quite old (it's based on the Minecraft 1.12 protocol and feature set), and the newer stuff is not yet generally usable
they have said they might have a new release towards the end of the year, but of course that could always lapse
still, I do want to continue supporting Glowstone 1.12 until the newer stuff is ready, I'll have that fixed hopefully soonish
you can try running paper in the REPL but honestly it's much easier to just download the server jar and drop in the plugin
awesome, I’ll try the server with the plugin approach if you dont have time to put out a fix. I really appreciate the quick responses and the help. going with the standalone server approach, which do you recommend?
if you want to run paper inside your repl you need to run paper standalone first, have it patch the mojang jar, then take that jar and add it to your classpath. You also need to create an eula.txt to show that you agree to the eula.
I've mostly been using PaperMC, it seems to be the most advanced/optimized of the bukkit servers