Fork me on GitHub
#babashka
<
2022-11-26
>
Casey13:11:41

Has anyone a recipe for getting reveal to work with babashka? I've tried:

(require '[babashka.deps :as deps])
(deps/add-deps '{:deps
                 {vlaaad/reveal {:mvn/version "1.3.275"}}})

(require '[vlaaad.reveal :as r])
But this throws:
clojure.lang.ExceptionInfo: Could not find namespace: clojure.spec.alpha.
{:type :sci/error, :line 2, :column 3, :message "Could not find namespace: clojure.spec.alpha.", :sci.impl/callstack #object[clojure.lang.Volatile 0x5a9340d8 {:status :ready, :val ({:line 1, :column 1, :file "/my/folder/parse.clj", :ns #object[sci.lang.Namespace 0x5f63fa59 "user"]} {:line 2, :column 3, :file "vlaaad/reveal.clj", :ns #object[sci.lang.Namespace 0x5be13318 "vlaaad.reveal"]})}], :file "vlaaad/reveal.clj"}
 at sci.impl.utils$rethrow_with_location_of_node.invokeStatic (utils.cljc:128)

Casey13:11:31

Hmm ok.. adding babashka spec.alpha..

(require '[babashka.deps :as deps])
(deps/add-deps '{:deps {
                        org.babashka/spec.alpha {:git/url "" :git/sha "644a7fc216e43d5da87b07471b0f87d874107d1a"}
                        org.clojure/core.specs.alpha {:mvn/version "0.2.62"}
                        vlaaad/reveal {:mvn/version "1.3.275"}}})

(require '[vlaaad.reveal :as r])
Throws:
clojure.lang.ExceptionInfo: Unable to resolve classname: java.net.URLConnection
{:type :sci/error, :line 8, :column 3, :message "Unable to resolve classname: java.net.URLConnection", :sci.impl/callstack #object[clojure.lang.Volatile 0x21f9e3cf {:status :ready, :val ({:line 1, :column 1, :file "/my/folder/parse.clj", :ns #object[sci.lang.Namespace 0x5f63fa59 "user"]} {:line 2, :column 3, :file "vlaaad/reveal.clj", :ns #object[sci.lang.Namespace 0x4e6308ff "vlaaad.reveal"]} {:line 2, :column 3, :file "vlaaad/reveal/action.clj", :ns #object[sci.lang.Namespace 0x71ca293f "vlaaad.reveal.action"]} {:line 3, :column 3, :file "vlaaad/reveal/stream.clj", :ns #object[sci.lang.Namespace 0x7f4ffabb "vlaaad.reveal.stream"]} {:line 2, :column 3, :file "vlaaad/reveal/style.clj", :ns #object[sci.lang.Namespace 0x1bc15623 "vlaaad.reveal.style"]} {:line 8, :column 3, :file "cljfx/css.clj", :ns #object[sci.lang.Namespace 0x82ed7eb "cljfx.css"]})}], :file "cljfx/css.clj"}
 at sci.impl.utils$rethrow_with_location_of_node.invokeStatic (utils.cljc:128)

borkdude14:11:23

We can try adding this class. For this it's best to check out babashka locally and run it with the JVM. I'll add a branch

borkdude14:11:26

@U70QFSCG2 If you use a newer bb that class is included, but the next issue is java.net.MalformedURLException - I'll also add that one

borkdude14:11:58

Oh yes, I already see the next problem:

[javafx.scene.text Font]
javafx is certainly not going to work with babashka. Portal does work with babashka btw, so if you're looking for an environment like that, use portal