Compare commits

..

No commits in common. "master" and "v1.12.200" have entirely different histories.

17 changed files with 21 additions and 89 deletions

View file

@ -183,9 +183,7 @@ java -jar \"$jar\" --config .build/bb.edn --deps-root . release-artifact \"$refl
{:persist_to_workspace {:root "/tmp" {:persist_to_workspace {:root "/tmp"
:paths ["release"]}} :paths ["release"]}}
(run "Run tests" "script/test\nscript/run_lib_tests") (run "Run tests" "script/test\nscript/run_lib_tests")
(run "Release + publish" (run "Release + publish" "BABASHKA_PUBLISH=true .circleci/script/release")
(str/join "\n" ["export BABASHKA_RELEASE=true"
".circleci/script/release"]))
{:save_cache {:save_cache
{:paths ["~/.m2" "~/graalvm"] {:paths ["~/.m2" "~/graalvm"]
:key cache-key}} :key cache-key}}

View file

@ -7,19 +7,8 @@ A preview of the next release can be installed from
[Babashka](https://github.com/babashka/babashka): Native, fast starting Clojure interpreter for scripting [Babashka](https://github.com/babashka/babashka): Native, fast starting Clojure interpreter for scripting
## Unreleased
- [#1818](https://github.com/babashka/babashka/issues/1818): wrong argument order in `clojure.java.io/resource` implementation
- Add `java.text.BreakIterator`
- Bump `fs` to `0.5.25`
- Bump `jsoup` to `1.20.1`
- Bump `edamame` to `1.4.30`
- [#1815](https://github.com/babashka/babashka/issues/1815): Make install-script wget-compatible ([@eval](https://github.com/eval))
## 1.12.200 (2025-04-26) ## 1.12.200 (2025-04-26)
- Improve Java reflection based on provided type hints (read blog post [here](https://blog.michielborkent.nl/babashka-java-reflection-type-hints.html))
- Add compatibility with the [fusebox](https://github.com/potetm/fusebox) library - Add compatibility with the [fusebox](https://github.com/potetm/fusebox) library
- Fix virtual `ThreadBuilder` interop - Fix virtual `ThreadBuilder` interop
- Add `java.util.concurrent.ThreadLocalRandom` - Add `java.util.concurrent.ThreadLocalRandom`

View file

@ -232,8 +232,6 @@ Install via the installer script for linux and macOS:
``` shell ``` shell
$ curl -sLO https://raw.githubusercontent.com/babashka/babashka/master/install $ curl -sLO https://raw.githubusercontent.com/babashka/babashka/master/install
# or
$ wget -qO install https://raw.githubusercontent.com/babashka/babashka/master/install
$ chmod +x install $ chmod +x install
$ ./install $ ./install
``` ```

View file

@ -52,7 +52,7 @@
org.babashka/cli {:mvn/version "0.8.65"} org.babashka/cli {:mvn/version "0.8.65"}
org.babashka/http-client {:mvn/version "0.4.22"} org.babashka/http-client {:mvn/version "0.4.22"}
org.flatland/ordered {:mvn/version "1.15.12"} org.flatland/ordered {:mvn/version "1.15.12"}
org.jsoup/jsoup {:mvn/version "1.20.1"}} org.jsoup/jsoup {:mvn/version "1.19.1"}}
:aliases {:babashka/dev :aliases {:babashka/dev
{:main-opts ["-m" "babashka.main"]} {:main-opts ["-m" "babashka.main"]}
:profile :profile
@ -176,9 +176,7 @@
org.clj-commons/hickory {:git/url "https://github.com/clj-commons/hickory" org.clj-commons/hickory {:git/url "https://github.com/clj-commons/hickory"
:git/sha "9385b6708ef35f161732d8464b3a3aa57dd79f30"} :git/sha "9385b6708ef35f161732d8464b3a3aa57dd79f30"}
com.potetm/fusebox {:git/url "https://github.com/potetm/fusebox" com.potetm/fusebox {:git/url "https://github.com/potetm/fusebox"
:git/sha "ac6d6a0a69510b009b3c1bb2247cd110fd9f7246"} :git/sha "ac6d6a0a69510b009b3c1bb2247cd110fd9f7246"}}
net.sekao/odoyle-rules {:git/url "https://github.com/oakes/odoyle-rules"
:git/sha "0b1d825ec45a998c4d3481dfb292e08ce6a47f0b"}}
:classpath-overrides {org.clojure/clojure nil :classpath-overrides {org.clojure/clojure nil
org.clojure/spec.alpha nil}} org.clojure/spec.alpha nil}}
:clj-nvd :clj-nvd

2
fs

@ -1 +1 @@
Subproject commit fdd5780bc4df4931332b56082c6c3a5c3c85066d Subproject commit 64b1c198576fe7babea5500ce6c7cfe6cc92f37b

36
install
View file

@ -29,32 +29,6 @@ print_help() {
exit 1 exit 1
} }
has() {
command -v "$1" >/dev/null 2>&1
}
fetch() {
local url=$1
local outfile=${2:-}
if has wget; then
if [[ -n $outfile ]]; then
wget -qO "$outfile" "$url"
else
wget -qO - "$url"
fi
elif has curl; then
if [[ -n $outfile ]]; then
curl -fsSL "$url" -o "$outfile"
else
curl -fsSL "$url"
fi
else
>&2 echo "Either 'wget' or 'curl' needs to be on PATH!"
exit 1
fi
}
while [[ $# -gt 0 ]] while [[ $# -gt 0 ]]
do do
key="$1" key="$1"
@ -106,9 +80,9 @@ fi
if [[ "$version" == "" ]]; then if [[ "$version" == "" ]]; then
if [[ "$dev_build" == "true" ]]; then if [[ "$dev_build" == "true" ]]; then
version="$(fetch https://raw.githubusercontent.com/babashka/babashka/master/resources/BABASHKA_VERSION)" version="$(curl -sL https://raw.githubusercontent.com/babashka/babashka/master/resources/BABASHKA_VERSION)"
else else
version="$(fetch https://raw.githubusercontent.com/babashka/babashka/master/resources/BABASHKA_RELEASED_VERSION)" version="$(curl -sL https://raw.githubusercontent.com/babashka/babashka/master/resources/BABASHKA_RELEASED_VERSION)"
fi fi
fi fi
@ -170,9 +144,9 @@ download_url="https://github.com/babashka/$repo/releases/download/v$version/$fil
# macOS only have shasum available by default # macOS only have shasum available by default
# Some Linux distros (RHEL-like) only have sha256sum available by default (others have both) # Some Linux distros (RHEL-like) only have sha256sum available by default (others have both)
if has sha256sum; then if command -v sha256sum >/dev/null; then
sha256sum_cmd="sha256sum" sha256sum_cmd="sha256sum"
elif has shasum; then elif command -v shasum >/dev/null; then
sha256sum_cmd="shasum -a 256" sha256sum_cmd="shasum -a 256"
else else
>&2 echo "Either 'sha256sum' or 'shasum' needs to be on PATH for '--checksum' flag!" >&2 echo "Either 'sha256sum' or 'shasum' needs to be on PATH for '--checksum' flag!"
@ -185,7 +159,7 @@ mkdir -p "$download_dir" && (
cd "$download_dir" cd "$download_dir"
echo -e "Downloading $download_url to $download_dir" echo -e "Downloading $download_url to $download_dir"
fetch "$download_url" "$filename" curl -o "$filename" -sL "$download_url"
if [[ -n "$checksum" ]]; then if [[ -n "$checksum" ]]; then
if ! echo "$checksum *$filename" | $sha256sum_cmd --check --status; then if ! echo "$checksum *$filename" | $sha256sum_cmd --check --status; then
>&2 echo "Failed checksum on $filename" >&2 echo "Failed checksum on $filename"

View file

@ -22,7 +22,7 @@
:flaky :flaky} :flaky :flaky}
:jvm-opts ["--enable-preview"] :jvm-opts ["--enable-preview"]
:dependencies [[org.clojure/clojure "1.12.0"] :dependencies [[org.clojure/clojure "1.12.0"]
[borkdude/edamame "1.4.30"] [borkdude/edamame "1.4.29"]
[org.clojure/tools.cli "1.0.214"] [org.clojure/tools.cli "1.0.214"]
[cheshire "6.0.0"] [cheshire "6.0.0"]
[nrepl/bencode "1.2.0"] [nrepl/bencode "1.2.0"]
@ -36,7 +36,7 @@
[insn/insn "0.5.2"] [insn/insn "0.5.2"]
[org.babashka/cli "0.8.65"] [org.babashka/cli "0.8.65"]
[org.babashka/http-client "0.4.22"] [org.babashka/http-client "0.4.22"]
[org.jsoup/jsoup "1.20.1"] [org.jsoup/jsoup "1.19.1"]
[borkdude/graal.locking "0.0.2"]] [borkdude/graal.locking "0.0.2"]]
:plugins [[org.kipz/lein-meta-bom "0.1.1"]] :plugins [[org.kipz/lein-meta-bom "0.1.1"]]
:metabom {:jar-name "metabom.jar"} :metabom {:jar-name "metabom.jar"}

View file

@ -1 +1 @@
1.12.200 1.12.199

View file

@ -1 +1 @@
1.12.201-SNAPSHOT 1.12.200

View file

@ -52,7 +52,7 @@
org.babashka/cli {:mvn/version "0.8.65"} org.babashka/cli {:mvn/version "0.8.65"}
org.babashka/http-client {:mvn/version "0.4.22"} org.babashka/http-client {:mvn/version "0.4.22"}
org.flatland/ordered {:mvn/version "1.15.12"} org.flatland/ordered {:mvn/version "1.15.12"}
org.jsoup/jsoup {:mvn/version "1.20.1"}} org.jsoup/jsoup {:mvn/version "1.19.1"}}
:aliases {:babashka/dev :aliases {:babashka/dev
{:main-opts ["-m" "babashka.main"]} {:main-opts ["-m" "babashka.main"]}
:profile :profile
@ -176,9 +176,7 @@
org.clj-commons/hickory {:git/url "https://github.com/clj-commons/hickory" org.clj-commons/hickory {:git/url "https://github.com/clj-commons/hickory"
:git/sha "9385b6708ef35f161732d8464b3a3aa57dd79f30"} :git/sha "9385b6708ef35f161732d8464b3a3aa57dd79f30"}
com.potetm/fusebox {:git/url "https://github.com/potetm/fusebox" com.potetm/fusebox {:git/url "https://github.com/potetm/fusebox"
:git/sha "ac6d6a0a69510b009b3c1bb2247cd110fd9f7246"} :git/sha "2f42391868c82c193628bec8922f8735ae3cac66"}}
net.sekao/odoyle-rules {:git/url "https://github.com/oakes/odoyle-rules"
:git/sha "0b1d825ec45a998c4d3481dfb292e08ce6a47f0b"}}
:classpath-overrides {org.clojure/clojure nil :classpath-overrides {org.clojure/clojure nil
org.clojure/spec.alpha nil}} org.clojure/spec.alpha nil}}
:clj-nvd :clj-nvd

2
sci

@ -1 +1 @@
Subproject commit e85433a0214114fdceb4ca896e1b9c27b1bdf713 Subproject commit ec068a93d012ecd4385c142e7352d24f9a06e74f

View file

@ -435,7 +435,6 @@
java.text.ParsePosition java.text.ParsePosition
;; adds about 200kb, same functionality provided by java.time: ;; adds about 200kb, same functionality provided by java.time:
java.text.SimpleDateFormat java.text.SimpleDateFormat
java.text.BreakIterator
~@(when features/java-time? ~@(when features/java-time?
`[java.time.format.DateTimeFormatter `[java.time.format.DateTimeFormatter
java.time.Clock java.time.Clock
@ -825,8 +824,6 @@
(and thread-builder (and thread-builder
(instance? thread-builder v)) (instance? thread-builder v))
thread-builder thread-builder
(instance? java.text.BreakIterator v)
java.text.BreakIterator
;; keep commas for merge friendliness ;; keep commas for merge friendliness
,)] ,)]
;; (prn :res res) ;; (prn :res res)

View file

@ -84,8 +84,8 @@
cp))) cp)))
(defn resource (defn resource
(^URL [path] (resource path @the-url-loader)) (^URL [path] (resource @the-url-loader path))
(^URL [path loader] (^URL [loader path]
(if (str/starts-with? path "/") nil ;; non-relative paths always return nil (if (str/starts-with? path "/") nil ;; non-relative paths always return nil
(getResource loader [path] true)))) (getResource loader [path] true))))

View file

@ -14,7 +14,7 @@
edn/read-string) edn/read-string)
deps (:deps deps) deps (:deps deps)
deps (assoc deps deps (assoc deps
'babashka/fs {:mvn/version "0.5.25"} 'babashka/fs {:mvn/version "0.5.24"}
'babashka/babashka.curl {:mvn/version "0.1.2"} 'babashka/babashka.curl {:mvn/version "0.1.2"}
'babashka/babashka.core {:git/url "https://github.com/babashka/babashka.core" 'babashka/babashka.core {:git/url "https://github.com/babashka/babashka.core"
:git/sha "52a6037bd4b632bffffb04394fb4efd0cdab6b1e"} :git/sha "52a6037bd4b632bffffb04394fb4efd0cdab6b1e"}

View file

@ -1190,7 +1190,7 @@ Use bb run --help to show this help output.
(println "[babashka] WARNING: config file does not exist:" config)) (println "[babashka] WARNING: config file does not exist:" config))
nil)) nil))
jar (let [jar (resolve-symbolic-link jar)] jar (let [jar (resolve-symbolic-link jar)]
(some->> [jar] cp/new-loader (cp/resource "META-INF/bb.edn") .toString)) (some-> [jar] cp/new-loader (cp/resource "META-INF/bb.edn") .toString))
:else (if (and file (fs/exists? file)) :else (if (and file (fs/exists? file))
;; file relative to bb.edn ;; file relative to bb.edn
(let [file (abs-path file) ;; follow symlink (let [file (abs-path file) ;; follow symlink

View file

@ -213,8 +213,4 @@
#_com.potetm.fusebox.rate-limit-test #_com.potetm.fusebox.rate-limit-test
com.potetm.fusebox.registry-test com.potetm.fusebox.registry-test
com.potetm.fusebox.retry-test com.potetm.fusebox.retry-test
#_com.potetm.fusebox.timeout-test]} #_com.potetm.fusebox.timeout-test]}}
net.sekao/odoyle-rules {:git-url "https://github.com/oakes/odoyle-rules"
:git-sha "0b1d825ec45a998c4d3481dfb292e08ce6a47f0b"
:test-paths ["test"]
:test-namespaces [odoyle.rules-test]}}

View file

@ -250,19 +250,3 @@
(is (nil? (bb nil "(import '(java.util.concurrent Executors ExecutorService)) (is (nil? (bb nil "(import '(java.util.concurrent Executors ExecutorService))
(let [fut (.submit ^ExecutorService (Executors/newCachedThreadPool) ^Runnable (fn [] 3))] (let [fut (.submit ^ExecutorService (Executors/newCachedThreadPool) ^Runnable (fn [] 3))]
(.get fut))")))) (.get fut))"))))
(deftest break-iterator-test
(is (= 1 (bb nil "(ns dude
(:import [java.text BreakIterator]))
(defn count-characters
[^String text]
(let [it (BreakIterator/getCharacterInstance)]
(.setText it text)
(loop [count 0]
(if (= (.next it) BreakIterator/DONE)
count
(recur (inc count))))))
(prn
(count-characters \"🇨🇦\"))"))))