Hello! I am struggling getting my app build and would appreciate some advice 🙏 First I just try to compile manually and run into a weird not found err:
user=> (require 'myapp.components.server)
2023-01-18T21:16:53.128Z DEBUG [com.fulcrologic.rad.blob:197] - Wrapping persist-images with image keys #{}
nil
user=> (compile 'myapp.components.server)
Unexpected error (IOException) macroexpanding clojure.core/gen-class at (myapp/components/server.clj:1:1).
No such file or directory
What is it it cannot find? Why? I have just (ns myapp.components.server (:require ...) (:gen-class)) <some code>compile implicit loads what is compiled, so I would start by not calling require first
Thanks! It gives the same error w/o that. I did require to demonstrate that the ns is accessible
the error is likely because you don't have the output directory for the compiled classfiles to go to set
Are you trying this manually because compile-clj is throwing an exception when you try to use tools.build? (trying to figure out how this relates to tools.build)
I am trying manually b/c my build call seems to get stuck and I want to find out if something weird happens when it is compiling
Probably some top-level def form that is trying to do something?
I mean, when you require the the namespace, why is it logging stuff?
Yes, that put me off to but it is fine, obviously some def-time setup. it works now - I guess I was just too impatient and the process took too long 😅 (by it I mean the T:build invocation)
user=> (doc *compile-path*)
-------------------------
clojure.core/*compile-path*
Specifies the directory where 'compile' will write out .class
files. This directory must be in the classpath for 'compile' to
work.
Defaults to "classes"
nil
user=>
AOT can be slow -- and copying all those files into target and then copying them all again into the JAR takes time 🙂
Thank you both very much!