Fork me on GitHub
#fulcro
<
2021-07-16
>
genekim16:07:36

Hi, all — I’m trying to get an uberjar created of a Fulcro RAD server application, with AOT to speed up startup time. I can start the server from clj with the given set of aliases no problem.

clj -A:dev:datomic
Clojure 1.10.3
user=> 
But when I attempt to make an uberjar with those same aliases, I get a “file not found” error, even though it should be on the classpath (from the “datomic” alias). Does anyone have any ideas on what I might be doing wrong? Thank you!
clj -X:datomic:dev:uberjar :aot true :jar ./target/feedly-reader-standalone.jar \
		:main-class com.example.components.server
[main] INFO hf.depstar.aot - Compiling com.example.components.server ...
Execution error (FileNotFoundException) at com.example.components.ring-middleware/loading (ring_middleware.clj:1).
Could not locate com/example/components/parser__init.class, com/example/components/parser.clj or com/example/components/parser.cljc on classpath.

Full report at:
/var/folders/wm/3c6kft990tqblqjmdlrhdf640000gn/T/clojure-11232942154003298116.edn

[main] ERROR hf.depstar.aot - Compilation failed!
Execution error (ExceptionInfo) at hf.depstar.uberjar/build-jar-as-exec (uberjar.clj:553).
AOT compilation failed

genekim16:07:59

(I know I shouldn’t have “dev” alias in uberjar… I included it just to see if it would resolve the problem.)

genekim16:07:13

(I also posted this in #depstar channel, but thought I’d cross-post here, in case any of you have had this problem. I’ll cross-post any answer, too. Thx!)

genekim16:07:22

Thanks to Sean Corfield, I have the answer: I was using depstar wrong: command line is: clj -X:uberjar :aliases ‘[:datomic]’ :aot true :jar ./target/feedly-reader-standalone.jar :main-class com.example.components.server. 🎉

Chase16:07:43

That guy is so freaking helpful and responsive

💯 17
3