Hey, I am trying to build an uberjar on github actions and am getting the following error:
Execution error (ConnectException) at (Net.java:-2).
Connection refused
Full report at:
/tmp/clojure-2948568327325594041.edn
Execution error (ExceptionInfo) at clojure.tools.build.tasks.compile-clj/compile-clj (compile_clj.clj:120).
Clojure compilation failed, working dir preserved: /tmp/compile-clj2408214728930010076
I am running clojure -T:build jar and my fn looks like
(defn jar [_]
(b/copy-dir {:src-dirs ["src" "resources"]
:target-dir class-dir})
(b/compile-clj {:basis basis
:src-dirs ["src"]
:class-dir class-dir
:bindings {#'clojure.core/*assert* false}})
(b/uber {:class-dir class-dir
:uber-file jar-file
:main main
:basis basis}))
I am using the latest tools.build at {:git/tag "v0.10.7" :git/sha "573711e"} and the clojure cli at 1.11.4.1474. Any ideas?Thanks. Yes that was it. Had some local dev vars hanging around.
All compiles fine locally.
As a thought experiment, can you disable network access (airplane mode, no wifi, whatever) and then build locally?
This sounds like a top level form that hits a network that is accessible locally and not from GitHub actions
What’s in the linked error report?
My assumption is that you have a top level def that connects to something. Compiling is a side effect of load which evals top level defs