Hi everyone,
After updating leiningen to version Leiningen 2.11.2 on Java 17.0.11 OpenJDK 64-Bit Server VM suddenly the builds always fail on my local machine. This is related to the :aot option in the project.clj. But I couldn't pinpoint the problem ... I attach my project.clj and errors here in the thread
thanks a lot
This is the original project.clj file that works seamlessly in our CI/CD but fails locally :
(defproject hermes.lib.system/core "0.1.13"
;; -------------------------------------------------------- ;;
;; -------------------------------------------------------- ;;
:description "FIXME: write description"
;; -------------------------------------------------------- ;;
:url " "
;; -------------------------------------------------------- ;;
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url " "}
;; -------------------------------------------------------- ;;
;; -------------------------------------------------------- ;;
:dependencies [[org.clojure/clojure "1.11.1" ]
[org.clojure/test.check "1.1.1" ]
[org.clojure/spec.alpha "0.3.218"]
[com.stuartsierra/component "1.1.0" ]
[com.taoensso/timbre "5.2.1" ]
[aero "1.1.6" ]
[net.cgrand/xforms "0.19.4" ]
[expound "0.9.0" ]
]
;; -------------------------------------------------------- ;;
;; -------------------------------------------------------- ;;
:resource-paths []
:min-lein-version "2.0.0"
:jvm-opts ["-XX:+UseG1GC"]
:javac-options ["-target" "11" "-source" "11"]
:global-vars {*warn-on-reflection* false
*assert* true}
;; -------------------------------------------------------- ;;
;; -------------------------------------------------------- ;;
:profiles {:dev {:global-vars {*warn-on-reflection* true
*assert* true}
:plugins [[lein-marginalia "0.9.1"]
[jonase/eastwood "1.2.3"]
[lein-codox "0.10.8"]
]}
:uberjar {:aot :all}}
;; -------------------------------------------------------- ;;
:repositories [["releases" {:url "..."
:username :env/nexus_username
:password :env/nexus_password
:sign-releases false}]
["snapshots" {:url "..."
:username :env/nexus_username
:password :env/nexus_password
:sign-releases false}]]
;; -------------------------------------------------------- ;;
;; -------------------------------------------------------- ;;
)
and here's the error (whenever I run lein uberjar or test or eastwood - I've also attached the full error):
Could not locate hermes/lib/system/core__init.class, hermes/lib/system/core.clj or hermes/lib/system/core.cljc on classpath.
Execution error (FileNotFoundException) at user/eval159$fn (form-init16235170205876792430.clj:1).
Could not locate hermes/lib/system/core__init.class, hermes/lib/system/core.clj or hermes/lib/system/core.cljc on classpath.Notes : • The namespace looks like this :
cat src/hermes/lib/system/core.clj ─╯
(ns hermes.lib.system.core
(:gen-class)
(:require
[aero.core :as aero ]
[clojure.spec.alpha :as spec ]
[clojure.string :as clj-str ]
[clojure.set :as clj-set ]
[taoensso.timbre :as timbre ]
[expound.alpha :as expound ]
[com.stuartsierra.component :as component]
))
;;------------------------------------------------------------------;;
;;------------------------------------------------------------------;;
(def Expound-Opts {:show-valid-values? false
:print-specs? true
:expound.printer/print-specs? false})• Am I using the :aot wrong ? I assumed since this file would be the main entry for the jar file I have to put :gen-class in the namespace and aot compile it ... Am I wrong ?
• Why all of a sudden with a version change in leiningen am I getting this problem ?