Lein uber jar hangs even though there are no blocking top level defs

I have two namespaces foo.core and foo.main. The foo.main namespace is just this

(ns foo.main
  (:require [foo.core :as core])

(println "started main")

(defn -main [& args]
  (println "I am here"))

(println "finished main")

And the foo.core namespace contains mount states.

(ns foo.core)

(println "started core")


(println "finished core")

But when I run lein uberjar this is the output that I get and it hangs there.

Compiling foo.core
started core
finished core
Compiling foo.main
started main
finished main

If the evaluation has reached the end in both the namespaces that means there could be nothing that is blocking right? What could have gone wrong here?


It’s very likely you have top-level defs that are causing agents or thread pools to be created, and this is why you are experiencing a “hang” at the end of compilation.


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.