From 78d59a3efb1f64f4d6fa42f0535d80861167b4b9 Mon Sep 17 00:00:00 2001 From: Peter Taoussanis Date: Mon, 29 Jan 2024 12:48:13 +0100 Subject: [PATCH] [fix] Resolve Babashka build issue --- bb/graal_tests.clj | 4 +++- project.clj | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bb/graal_tests.clj b/bb/graal_tests.clj index b8c00d6..3397ebe 100755 --- a/bb/graal_tests.clj +++ b/bb/graal_tests.clj @@ -28,7 +28,9 @@ (let [graalvm-home (System/getenv "GRAALVM_HOME") bin-dir (str (fs/file graalvm-home "bin"))] (shell (executable bin-dir "gu") "install" "native-image") - (shell (executable bin-dir "native-image") "-jar" "target/graal-tests.jar" "--no-fallback" "graal_tests"))) + (shell (executable bin-dir "native-image") + "--features=clj_easy.graal_build_time.InitClojureClasses" + "--no-fallback" "-jar" "target/graal-tests.jar" "graal_tests"))) (defn run-tests [] (let [{:keys [out]} (shell {:out :string} (executable "." "graal_tests"))] diff --git a/project.clj b/project.clj index 5262634..57de4bd 100644 --- a/project.clj +++ b/project.clj @@ -30,11 +30,13 @@ :exclusions [com.taoensso/truss]]]} :graal-tests - {:dependencies [[org.clojure/clojure "1.11.1"] - [com.github.clj-easy/graal-build-time "0.1.4"]] + {:source-paths ["test"] :main taoensso.graal-tests :aot [taoensso.graal-tests] - :uberjar-name "graal-tests.jar"} + :uberjar-name "graal-tests.jar" + :dependencies + [[org.clojure/clojure "1.11.1"] + [com.github.clj-easy/graal-build-time "1.0.5"]]} :dev [:c1.11 :test :dev+] :dev+