tools-build

FiVo 2025-03-18T22:48:29.646789Z

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?

FiVo 2025-03-19T08:32:56.169659Z

Thanks. Yes that was it. Had some local dev vars hanging around.

FiVo 2025-03-18T22:49:20.617639Z

All compiles fine locally.

dpsutton 2025-03-18T23:14:01.824289Z

As a thought experiment, can you disable network access (airplane mode, no wifi, whatever) and then build locally?

dpsutton 2025-03-18T23:14:22.930119Z

This sounds like a top level form that hits a network that is accessible locally and not from GitHub actions

Alex Miller (Clojure team) 2025-03-18T23:21:12.209739Z

What’s in the linked error report?

Alex Miller (Clojure team) 2025-03-18T23:31:02.642809Z

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