diff --git a/script/compile b/script/compile index 5e2de169..42ab80c2 100755 --- a/script/compile +++ b/script/compile @@ -105,7 +105,6 @@ then export BABASHKA_FEATURE_SELMER="${BABASHKA_FEATURE_SELMER:-false}" export BABASHKA_FEATURE_LOGGING="${BABASHKA_FEATURE_LOGGING:-false}" export BABASHKA_FEATURE_PRIORITY_MAP="${BABASHKA_FEATURE_PRIORITY_MAP:-false}" - export BABASHKA_FEATURE_RRB_VECTOR="${BABASHKA_FEATURE_RRB_VECTOR:-false}" fi "$GRAALVM_HOME/bin/native-image" "${args[@]}" diff --git a/script/uberjar b/script/uberjar index 5bc24c98..56414ace 100755 --- a/script/uberjar +++ b/script/uberjar @@ -168,7 +168,7 @@ else BABASHKA_LEIN_PROFILES+=",-feature/priority-map" fi -if [ "$BABASHKA_FEATURE_RRB_VECTOR" != "false" ] +if [ "$BABASHKA_FEATURE_RRB_VECTOR" = "true" ] then BABASHKA_LEIN_PROFILES+=",+feature/rrb-vector" else diff --git a/src/babashka/impl/features.clj b/src/babashka/impl/features.clj index 271cf136..7639997c 100644 --- a/src/babashka/impl/features.clj +++ b/src/babashka/impl/features.clj @@ -17,7 +17,6 @@ (def selmer? (not= "false" (System/getenv "BABASHKA_FEATURE_SELMER"))) (def logging? (not= "false" (System/getenv "BABASHKA_FEATURE_LOGGING"))) (def priority-map? (not= "false" (System/getenv "BABASHKA_FEATURE_PRIORITY_MAP"))) -(def rrb-vector? (not= "false" (System/getenv "BABASHKA_FEATURE_RRB_VECTOR"))) ;; excluded by default (def jdbc? (= "true" (System/getenv "BABASHKA_FEATURE_JDBC"))) @@ -28,6 +27,7 @@ (def datascript? (= "true" (System/getenv "BABASHKA_FEATURE_DATASCRIPT"))) (def lanterna? (= "true" (System/getenv "BABASHKA_FEATURE_LANTERNA"))) (def spec-alpha? (= "true" (System/getenv "BABASHKA_FEATURE_SPEC_ALPHA"))) +(def rrb-vector? (= "true" (System/getenv "BABASHKA_FEATURE_RRB_VECTOR"))) (when xml? (require '[babashka.impl.xml])) diff --git a/src/babashka/main.clj b/src/babashka/main.clj index cd858415..deac45ee 100644 --- a/src/babashka/main.clj +++ b/src/babashka/main.clj @@ -387,7 +387,10 @@ Use bb run --help to show this help output. 'rewrite-clj.paredit rewrite/paredit-namespace 'rewrite-clj.parser rewrite/parser-namespace 'rewrite-clj.zip rewrite/zip-namespace - 'rewrite-clj.zip.subedit rewrite/subedit-namespace} + 'rewrite-clj.zip.subedit rewrite/subedit-namespace + 'clojure.core.rrb-vector (if features/rrb-vector? + @(resolve 'babashka.impl.rrb-vector/rrb-vector-namespace) + {'catvec (sci/copy-var into (sci/create-ns 'clojure.core.rrb-vector))})} features/xml? (assoc 'clojure.data.xml @(resolve 'babashka.impl.xml/xml-namespace) 'clojure.data.xml.event @(resolve 'babashka.impl.xml/xml-event-namespace) 'clojure.data.xml.tree @(resolve 'babashka.impl.xml/xml-tree-namespace)) @@ -447,8 +450,7 @@ Use bb run --help to show this help output. 'clojure.tools.logging.readable @(resolve 'babashka.impl.logging/tools-logging-readable-namespace)) features/priority-map? (assoc 'clojure.data.priority-map - @(resolve 'babashka.impl.priority-map/priority-map-namespace)) - features/rrb-vector? (assoc 'clojure.core.rrb-vector @(resolve 'babashka.impl.rrb-vector/rrb-vector-namespace)))) + @(resolve 'babashka.impl.priority-map/priority-map-namespace)))) (def edn-readers (cond-> {} features/yaml?