Hi! Building an uberjar, the compilation runs since about fifteen minutes already, last message was "Compiling XXX.util.spec.clj" and nothing happens thereafter, while the java
process is running at 100% of one core. Is there a bug known in this context? Could it be a problem with my project.clj
?
Result: Uberjar aborting because jar failed: No space left on device
Ideas?
maybe check that you have enough disk space?
Before starting lein uberjar
I have 110GB free.
And what is growing to that size is actually the uberjar.
not sure then. I might try removing sections of your program to try to pinpoint the issue
It appears the uberjar contains itself...
I just checked with zip -FF SNAPSHOT.jar.zip --out SNAPSHOT.jar.fixed.zip
.
@devurandom yeah, sounds like some sort of circular reference
maybe lein deps :tree
can help find the issue, not sure
may have to do lein with-profile +uberjar deps :tree
too
I assume this is because :resource-paths
contains target
, because I build ClojureScript and CSS files into that location. I will try to build the cljs/js and css files into a different location...
(And the uberjar is being build into target
)
Yep, that seems to have fixed it.
I guess I am not the first one to encounter this. How do people generally handle that? If they need the js files compiled by figwheel and some css files inside their resource dir in the Java process for fighweel's internal web server?
Thanks!
Found it: https://github.com/bhauman/figwheel-main/issues/134
I usually have all frontend/ui things inside src/frontend
or src/ui
, when compiling the output ends up in resources/public/js
, so not hitting this issue
resources/
only has index.html
which runs the compiled JS
@devurandom yeah, I never put the js in target, resources/public/js/compiled or something like that
There is also https://github.com/bhauman/figwheel-main/pull/138 with some discussion.
Then you also have to add those as clean targets to your lein project
:clean-targets ^{:protect false} [:compile-path :target-path
"resources/public/js/compiled"]
something like thatthat way lein clean
will remove the compiled js stuff - which you’d typically want to work
@mikerod Thanks!
hi - does anyone know how to specify an entrypoint to lein test
e.g. if I want to call mount/start
before running any tests, it would be convenient to run (mount/start)
and some other setup that is cross-project before testing starts. Currently I've resorted to simply calling (mount/start)
in a namespace that lives in the test/
directory which does the trick but this feels suboptimal and probably will interfere with other developers' workflows