scicloj / notespace

using your namespace as a notebook
Eclipse Public License 2.0
148 stars 10 forks source link

notespace does not work on headless server #25

Closed behrica closed 3 years ago

behrica commented 3 years ago

JavaFX does not work on a servr without working X11 / DISPLAY.

I found a workaround from the cljfx package, namely adding this into project.clj:

diff --git a/project.clj b/project.clj
index e6d23b3..8ff5e10 100644
--- a/project.clj
+++ b/project.clj
@@ -26,4 +26,9 @@
                  [cljfx "1.7.5"]
                  [org.clojure/core.cache "1.0.207"]
                  [hawk "0.2.11"]
-                 [scicloj/gorilla-notes "0.5.0-SNAPSHOT"]])
+                 [scicloj/gorilla-notes "0.5.0-SNAPSHOT"]
+                 [org.testfx/openjfx-monocle "jdk-12.0.1+2"]]
+  
+
+  :jvm-opts ["-Dtestfx.robot=glass" "-Dglass.platform=Monocle" "-Dmonocle.platform=Headless" "-Dprism.order=sw"]
+  )

As well suggested here: https://stackoverflow.com/questions/27403410/headless-testing-with-javafx-and-testfx

daslu commented 3 years ago

Nice.

behrica commented 3 years ago

Not sure, if we want to "set" this properties somewhere in notespace itself. If not, the user of notespace needed to do so.

daslu commented 3 years ago

Good question. In general, we need to discuss if Cljfx remains a dependency.

daslu commented 3 years ago

Version 3-beta4 removes the dependency on (the magnificent) cljfx, to avoid depending on JavaFX. The necessary parts were moved under the notespace.cljfx.* namespaces.