cljfx

https://github.com/cljfx/cljfx
2019-08-02T04:15:28.009400Z

Hello! I'm trying to get started with cljfx and I'm running into a peculiar error: namespace 'cljfx.api' not found

2019-08-02T04:16:43.010700Z

I've done some basic checking and I've got the jar file in ~/.m2/repository/cljfx/cljfx/1.4.0/, I've got the dependency listed in my project.clj as [cljfx "1.4.0"].

2019-08-02T04:17:22.011500Z

I'm using cider with emacs and I can jack in to the project, and the autocomplete knows about cljfx.api, but when I try to require it throws a namespace not found.

2019-08-02T04:18:50.012200Z

When I try calling functions directly (cljfx.api/on-fx-thread) I get a ClassNotFoundException (of course)

2019-08-02T04:19:03.012500Z

According to my repl, I'm running the right versions of stuff: ;; Clojure 1.10.0, Java 11.0.3-internal

2019-08-02T04:19:54.013200Z

I've not come across this sort of problem before and I thought I'd check here in case there was something obviously wrong that I was missing

vlaaad 2019-08-02T06:54:37.013600Z

Hi! Can you show your project.clj?

vlaaad 2019-08-02T06:59:11.013700Z

Also can you try running clj -Sdeps '{:deps {cljfx {:mvn/version "1.4.0"}}}' and requiring cljfx.api from that repl to verify it's not leiningens fault?

2019-08-02T18:22:29.014100Z

└─> clj -Sdeps '{:deps {cljfx {:mvn/version "1.4.0"}}}'
Clojure 1.10.0
user=> (dir cljfx.api)
Execution error at user/eval140 (REPL:1).
No namespace: cljfx.api found
user=> 

2019-08-02T18:23:09.014400Z

And here's my project.clj:

2019-08-02T18:23:15.014600Z

(defproject counter-gui "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "<http://example.com/FIXME>"
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url "<https://www.eclipse.org/legal/epl-2.0/>"}
  :dependencies [[org.clojure/clojure "1.10.0"]
                 [cljfx "1.4.0"]]
  :main ^:skip-aot counter-gui.core
  :target-path "target/%s")

2019-08-02T18:25:02.015Z

I've also tried with clojure 1.10.1, but that produced the same result

vlaaad 2019-08-02T18:27:05.015100Z

Can you try 1.3.5 to validate it's not a broken version? I'm on vacation without access to computer, so can't do it right now

2019-08-02T18:28:05.015500Z

oh, this isn't urgent! Go back to your vacation, I can bother you later : )

vlaaad 2019-08-02T18:28:53.015700Z

Thanks :)

vlaaad 2019-08-02T18:30:01.016800Z

I would try to run clj command above with -Spath to see what's on classpath, then verify it has cljfx jar, then try to open that jar with archiver and verify files are there

2019-08-02T18:30:35.017600Z

Ok, I'll mess with that. But I'm not going to tell you about the results until next week, so go have fun.

👍 1
souenzzo 2019-08-02T20:52:39.018500Z

@datran checkout this

~  clj -Srepro -Sdeps '{:deps {cljfx {:mvn/version "1.4.0"}}}'
Clojure 1.10.1
user=&gt; (System/getProperty "java.version")
"11.0.4"
user=&gt; (dir cljfx.api)
Execution error at user/eval142 (REPL:1).
No namespace: cljfx.api found
user=&gt; (require 'cljfx.api)
nil
user=&gt; (dir cljfx.api)
advance-component
create-app
...
I use -Srepro to ignore my local config and create a reproducible setup.

2019-08-02T22:35:33.019Z

Thanks for this tip, I found something interesting:

2019-08-02T22:35:36.019200Z

└─&gt; clj -Srepro -Sdeps '{:deps {cljfx {:mvn/version "1.4.0"}}}'
Clojure 1.10.0
user=&gt; (System/getProperty "java.version")
"1.8.0_212"

2019-08-02T22:36:08.019400Z

That's an old version of the jdk, so I think I have some spelunking to do. I think this is a very promising avenue, though.

2019-08-02T22:57:00.020300Z

I've been integrating TestFX with cljfx, progress so far:

🔥 2