From 3bdeee8bee86912635d601fc70a56b11ecd77d13 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Wed, 7 Dec 2022 17:05:47 +0100 Subject: [PATCH 01/33] sync process [skip ci] --- process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process b/process index 14e1259b..9e19562e 160000 --- a/process +++ b/process @@ -1 +1 @@ -Subproject commit 14e1259bb7caff3882921d6f6c71e6f08739113f +Subproject commit 9e19562e108381be7bced275a9065dc182ec1c62 From 46b6dfd3c34612b3b0127986ea93eac34cf34713 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Thu, 8 Dec 2022 13:34:30 +0100 Subject: [PATCH 02/33] Update fs: better fix for splitting on extension --- fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs b/fs index 965ca67e..d3226ccc 160000 --- a/fs +++ b/fs @@ -1 +1 @@ -Subproject commit 965ca67eb1b1ef26c412fa494ce31268fd456c8e +Subproject commit d3226cccd9898eba5adb50dfcc30a7223ff5c8cc From c931fbe294cec64c03b2e6ac7255bcaeb86a0c8a Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Thu, 8 Dec 2022 15:00:40 +0100 Subject: [PATCH 03/33] sync process [skip ci] --- process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process b/process index 9e19562e..dbfa8146 160000 --- a/process +++ b/process @@ -1 +1 @@ -Subproject commit 9e19562e108381be7bced275a9065dc182ec1c62 +Subproject commit dbfa814648869ed99b37ef716b6f432b5e913add From 9dff25d36b45cf424d4da9b21b2288f56694cd7c Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Thu, 8 Dec 2022 15:05:08 +0100 Subject: [PATCH 04/33] process [skip ci] --- process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process b/process index dbfa8146..fa7e470a 160000 --- a/process +++ b/process @@ -1 +1 @@ -Subproject commit dbfa814648869ed99b37ef716b6f432b5e913add +Subproject commit fa7e470a4ecd1511cba5109a2ed91cdb98cf803a From 5ac048157a3680632f41dff0e2d877a99e86a2cb Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Thu, 8 Dec 2022 23:26:54 +0100 Subject: [PATCH 05/33] sci: speed up case --- sci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sci b/sci index 62a16eb6..f77b9d02 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 62a16eb620bb6e8ae072f9f17baa3de5546f0902 +Subproject commit f77b9d02959b1d994eb4abf4b30b0c66380148dd From 683752c6028da94b6a0968b67d3fe5123283d567 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Fri, 9 Dec 2022 12:51:33 +0100 Subject: [PATCH 06/33] Always install static binary on linux amd64 --- install | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install b/install index cb680842..a9c0090d 100755 --- a/install +++ b/install @@ -94,7 +94,12 @@ case "$(uname -m)" in arch="aarch64" fi ;; - *) arch=amd64;; + *) arch=amd64 + # always use static image on linux + if [[ "$platform" == "linux" ]]; then + static_binary="true" + fi + ;; esac if [[ 10#$vernum -le 10#000002013 ]]; then From 7d5083ac0a50c6eba16a31e107bed70bf5916522 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Fri, 9 Dec 2022 13:05:29 +0100 Subject: [PATCH 07/33] Fix #1434, document installing on Alpine --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 92cf4c2d..afc47b97 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,11 @@ Upgrade: You can find more documentation on how to use babashka with nix [here](./doc/nix.md). +### Alpine + +On Alpine it's recommended to install via the `install` [bash +script](https://github.com/babashka/babashka#installer-script). + ### Arch (Linux) `babashka` is [available](https://aur.archlinux.org/packages/babashka-bin/) in the [Arch User Repository](https://aur.archlinux.org). It can be installed using your favorite [AUR](https://aur.archlinux.org) helper such as @@ -224,7 +229,7 @@ $ ./install --static ### Installer script -Install via the installer script: +Install via the installer script for linux and macOS: ``` shell $ curl -sLO https://raw.githubusercontent.com/babashka/babashka/master/install From f7b235635a6266c4e0e6ff87e1654f2c174308b4 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Fri, 9 Dec 2022 13:08:03 +0100 Subject: [PATCH 08/33] doc improvement --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index afc47b97..72e9b7c6 100644 --- a/README.md +++ b/README.md @@ -176,8 +176,9 @@ You can find more documentation on how to use babashka with nix [here](./doc/nix ### Alpine -On Alpine it's recommended to install via the `install` [bash -script](https://github.com/babashka/babashka#installer-script). +On Alpine it's recommended to download the binary manually from [Github +Releases](https://github.com/babashka/babashka/releases) and use the static +linux binary. ### Arch (Linux) From 58dbd2b6aab1e6f29f66f8190ef27da81217a27b Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 9 Dec 2022 12:22:24 +0000 Subject: [PATCH 09/33] Update zlib to version 1.2.13 --- Dockerfile | 5 +++-- script/setup-musl | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 573142ce..f9ad88b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,9 @@ WORKDIR "/opt" ENV GRAALVM_VERSION="22.3.0" ARG TARGETARCH -ENV BABASHKA_ARCH=${TARGETARCH} -ENV GRAALVM_ARCH=${TARGETARCH} +# Do not set those directly, use TARGETARCH instead +ENV BABASHKA_ARCH= +ENV GRAALVM_ARCH= RUN if [ "${TARGETARCH}" = "" ] || [ "${TARGETARCH}" = "amd64" ]; then \ export GRAALVM_ARCH=amd64; export BABASHKA_ARCH=x86_64; \ elif [ "${TARGETARCH}" = "arm64" ]; then \ diff --git a/script/setup-musl b/script/setup-musl index ad055064..dcb552e5 100755 --- a/script/setup-musl +++ b/script/setup-musl @@ -19,8 +19,8 @@ fi apt-get update -y && apt-get install musl-tools -y -ZLIB_VERSION="1.2.11" -ZLIB_SHA256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" +ZLIB_VERSION="1.2.13" +ZLIB_SHA256="b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30" # stable archive path curl -O -sL --fail --show-error "https://zlib.net/fossils/zlib-${ZLIB_VERSION}.tar.gz" From c7ccc6fedb593526c4908f1297baaa3371464fd2 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Fri, 9 Dec 2022 18:39:43 +0100 Subject: [PATCH 10/33] Fix #1446: add pprint/code-dispatch --- sci | 2 +- src/babashka/impl/pprint.clj | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sci b/sci index f77b9d02..df37fdea 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit f77b9d02959b1d994eb4abf4b30b0c66380148dd +Subproject commit df37fdeafbc9ed8d4f089b1ecaabc1e6eef02cc0 diff --git a/src/babashka/impl/pprint.clj b/src/babashka/impl/pprint.clj index 0c0e815f..88ada2e6 100644 --- a/src/babashka/impl/pprint.clj +++ b/src/babashka/impl/pprint.clj @@ -208,6 +208,7 @@ 'init-navigator (sci/copy-var pprint/init-navigator pprint-ns) 'execute-format (sci/copy-var execute-format pprint-ns) 'with-pprint-dispatch (sci/copy-var pprint/with-pprint-dispatch pprint-ns) + 'code-dispatch (sci/copy-var pprint/code-dispatch pprint-ns) '*print-pprint-dispatch* print-pprint-dispatch '*print-miser-width* print-miser-width 'get-pretty-writer (sci/copy-var get-pretty-writer pprint-ns) From d721b925f4ec3b5808061c9c0a82495f528fdb73 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Fri, 9 Dec 2022 19:12:16 +0100 Subject: [PATCH 11/33] Support --dev-build flag --- install | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/install b/install index a9c0090d..349405b0 100755 --- a/install +++ b/install @@ -8,6 +8,7 @@ static_binary="false" default_install_dir="/usr/local/bin" install_dir="$default_install_dir" download_dir="" +dev_build="" print_help() { echo "Installs latest (or specific) version of babashka. Installation directory defaults to /usr/local/bin." @@ -56,6 +57,10 @@ do static_binary="true" shift ;; + --dev-build) + dev_build="true" + shift + ;; *) # unknown option print_help shift @@ -74,7 +79,11 @@ if [[ "$checksum" != "" ]] && [[ "$version" == "" ]]; then fi if [[ "$version" == "" ]]; then - version="$(curl -sL https://raw.githubusercontent.com/babashka/babashka/master/resources/BABASHKA_RELEASED_VERSION)" + if [[ "$dev_build" == "true" ]]; then + version="$(curl -sL https://raw.githubusercontent.com/babashka/babashka/master/resources/BABASHKA_VERSION)" + else + version="$(curl -sL https://raw.githubusercontent.com/babashka/babashka/master/resources/BABASHKA_RELEASED_VERSION)" + fi fi case "$(uname -s)" in From ba328f2387998477a8f1d569add61b895987d5f5 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sat, 10 Dec 2022 11:48:29 +0100 Subject: [PATCH 12/33] ns as macro (#1447) --- sci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sci b/sci index df37fdea..68e793bc 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit df37fdeafbc9ed8d4f089b1ecaabc1e6eef02cc0 +Subproject commit 68e793bc21cc5605bfafec9e258b549a4b8c5e8b From f9131b2979642ea2e5568c5fcc1cace0fb9fd8fb Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sat, 10 Dec 2022 12:04:28 +0100 Subject: [PATCH 13/33] lazy-seq as macro --- sci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sci b/sci index 68e793bc..0b4cc442 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 68e793bc21cc5605bfafec9e258b549a4b8c5e8b +Subproject commit 0b4cc4423ff639aff1a553a87f7ef7e6b2b54043 From b9fa877cd7658fb726227c91a71116e1d766d439 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sat, 10 Dec 2022 12:22:22 +0100 Subject: [PATCH 14/33] Constructor of LazySeq --- src/babashka/impl/classes.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/babashka/impl/classes.clj b/src/babashka/impl/classes.clj index 5be3651b..b7e46ad9 100644 --- a/src/babashka/impl/classes.clj +++ b/src/babashka/impl/classes.clj @@ -120,7 +120,8 @@ clojure.lang.APersistentVector {:methods [{:name "indexOf"}]} clojure.lang.LazySeq - {:methods [{:name "indexOf"}]} + {:allPublicConstructors true, + :methods [{:name "indexOf"}]} clojure.lang.ILookup {:methods [{:name "valAt"}]} clojure.lang.IPersistentMap From 44dbc57cda79759fefcdb0fad9842ea873040041 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sat, 10 Dec 2022 14:41:29 +0100 Subject: [PATCH 15/33] Restore inlined functions --- sci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sci b/sci index 0b4cc442..b7b9772b 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 0b4cc4423ff639aff1a553a87f7ef7e6b2b54043 +Subproject commit b7b9772b873c43ef408f0e94c4ce9e6d00f8fe69 From 38dc526680701221692122bccf14cda4e5a7b9d4 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sat, 10 Dec 2022 15:18:15 +0100 Subject: [PATCH 16/33] Fix inlined alength --- sci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sci b/sci index b7b9772b..5b2c94bb 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit b7b9772b873c43ef408f0e94c4ce9e6d00f8fe69 +Subproject commit 5b2c94bb979a7c79d69322d1336ecdfdddfac2d4 From e619a896a1526282c91d0f29c0abf7d1b7e636b8 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sat, 10 Dec 2022 20:55:31 +0100 Subject: [PATCH 17/33] restore init --- sci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sci b/sci index 5b2c94bb..280865a9 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 5b2c94bb979a7c79d69322d1336ecdfdddfac2d4 +Subproject commit 280865a9850d3befd5239bf42b3aa016230bc0c4 From 5570c416e94c4c02fe659f3143b81ca3db665c72 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sun, 11 Dec 2022 18:06:23 +0100 Subject: [PATCH 18/33] v0.6.41 --- deps.edn | 2 +- project.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps.edn b/deps.edn index 4e875585..692d7724 100644 --- a/deps.edn +++ b/deps.edn @@ -50,7 +50,7 @@ org.clojure/data.priority-map {:mvn/version "1.1.0"} insn/insn {:mvn/version "0.5.2"} org.clojure/core.rrb-vector {:mvn/version "0.1.2"} - org.babashka/cli {:mvn/version "0.5.40"}} + org.babashka/cli {:mvn/version "0.6.41"}} :aliases {:babashka/dev {:main-opts ["-m" "babashka.main"]} :profile diff --git a/project.clj b/project.clj index 106731db..f5794d71 100644 --- a/project.clj +++ b/project.clj @@ -32,7 +32,7 @@ [com.github.clj-easy/graal-build-time "0.1.0"] [rewrite-clj/rewrite-clj "1.1.45"] [insn/insn "0.5.2"] - [org.babashka/cli "0.5.40"]] + [org.babashka/cli "0.6.41"]] :plugins [[org.kipz/lein-meta-bom "0.1.1"]] :metabom {:jar-name "metabom.jar"} :profiles {:feature/xml {:source-paths ["feature-xml"] From 72377d090fee865e8d8d057429d159aed9c88477 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sun, 11 Dec 2022 18:17:12 +0100 Subject: [PATCH 19/33] Bump built-in deps.edn [skip ci] --- resources/META-INF/babashka/deps.edn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/META-INF/babashka/deps.edn b/resources/META-INF/babashka/deps.edn index 4e875585..692d7724 100644 --- a/resources/META-INF/babashka/deps.edn +++ b/resources/META-INF/babashka/deps.edn @@ -50,7 +50,7 @@ org.clojure/data.priority-map {:mvn/version "1.1.0"} insn/insn {:mvn/version "0.5.2"} org.clojure/core.rrb-vector {:mvn/version "0.1.2"} - org.babashka/cli {:mvn/version "0.5.40"}} + org.babashka/cli {:mvn/version "0.6.41"}} :aliases {:babashka/dev {:main-opts ["-m" "babashka.main"]} :profile From df24cf287dbbab42b13b375912aa924419d98308 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Mon, 12 Dec 2022 21:19:23 +0100 Subject: [PATCH 20/33] Update deps.clj --- deps.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps.clj b/deps.clj index a195e410..5b5c1ba6 160000 --- a/deps.clj +++ b/deps.clj @@ -1 +1 @@ -Subproject commit a195e410bfd61b3befcab40915cf6c2e54b0b7ca +Subproject commit 5b5c1ba63a909653fdc9830329560d84c418a63f From dc2502ebae0c58034d9307b7000a735d63ad3388 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Wed, 14 Dec 2022 14:46:42 +0100 Subject: [PATCH 21/33] deps.clj --- deps.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps.clj b/deps.clj index 5b5c1ba6..2d185718 160000 --- a/deps.clj +++ b/deps.clj @@ -1 +1 @@ -Subproject commit 5b5c1ba63a909653fdc9830329560d84c418a63f +Subproject commit 2d185718ba2871c96e6cb4a4181d1dcf9d8fde86 From 965c177bca31ae9882c975ef7db448e12f59984e Mon Sep 17 00:00:00 2001 From: Gabe Date: Wed, 14 Dec 2022 15:57:07 +0200 Subject: [PATCH 22/33] Fix #1280: babashka REPL doesn't quit right after ctrl-d (#1450) the problem is that parser/parse-next waits for an enter before returning an object we can use peek-char to pre-emptively react to any EOF at the start of the line in case of not-start-of-line, parse-next takes over Co-authored-by: Alice Margatroid --- src/babashka/impl/repl.clj | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/babashka/impl/repl.clj b/src/babashka/impl/repl.clj index e1083b5b..11dcf370 100644 --- a/src/babashka/impl/repl.clj +++ b/src/babashka/impl/repl.clj @@ -63,13 +63,14 @@ (eval-form sci-ctx `(apply require (quote ~m/repl-requires))))) :read (or read (fn [_request-prompt request-exit] - (let [v (parser/parse-next sci-ctx in)] - (skip-if-eol in) - (if (or (identical? :repl/quit v) - (identical? :repl/exit v) - (identical? parser/eof v)) - request-exit - v)))) + (if (nil? (r/peek-char in)) + request-exit + (let [v (parser/parse-next sci-ctx in)] + (skip-if-eol in) + (if (or (identical? :repl/quit v) + (identical? :repl/exit v)) + request-exit + v))))) :eval (or eval (fn [expr] (sci/with-bindings {sci/file "" From 2535299be885d9eb98e5ac39b76d3e24cd34b8dc Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sun, 18 Dec 2022 12:04:30 +0100 Subject: [PATCH 23/33] README [skip ci] --- README.md | 2 ++ process | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 72e9b7c6..aac0669c 100644 --- a/README.md +++ b/README.md @@ -405,6 +405,8 @@ handling of SIGINT and SIGPIPE. This can be done by setting ## Articles, podcasts and videos +- [Babashka: How GraalVM Helped Create a Fast-Starting Scripting Environment for Clojure](https://medium.com/graalvm/babashka-how-graalvm-helped-create-a-fast-starting-scripting-environment-for-clojure-b0fcc38b0746) by Michiel Borkent +- [Adding Prompts To Your Babashka Scripts With Dialog](https://www.pixelated-noise.com/blog/2022/12/09/dialog-and-babashka/index.html) by A.C. Danvers - [Using Babashka to Get Electricity Prices](https://www.karimarttila.fi/clojure/2022/12/04/using-babashka-to-get-electricity-prices.html) by Kari Marttila - [Manage git hooks with babashka tasks](https://blaster.ai/blog/posts/manage-git-hooks-w-babashka.html) by Mykhaylo Bilyanskyy - [Messing around with babashka](https://ian-muge.medium.com/messing-around-with-babashka-f181a9003faa) by Ian Muge diff --git a/process b/process index fa7e470a..90e4cf0b 160000 --- a/process +++ b/process @@ -1 +1 @@ -Subproject commit fa7e470a4ecd1511cba5109a2ed91cdb98cf803a +Subproject commit 90e4cf0b0cc7856f8c39591c3350cdf156d11042 From 37e2da9f5bc7fcfd7da122230ae90fbafe65c701 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Mon, 19 Dec 2022 14:41:13 +0100 Subject: [PATCH 24/33] minor README --- README.md | 5 +++-- sci | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aac0669c..75a23601 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ anywhere on the path. Then you're ready to go: ``` shellsession -$ ls | bb -i '(filter #(-> % io/file .isDirectory) *input*)' +$ ls | bb -i '(filter fs/directory? *input*)' ("doc" "resources" "sci" "script" "src" "target" "test") bb took 4ms. ``` @@ -109,7 +109,8 @@ $ bb '(vec (dedupe *input*))' <<< '[1 1 1 1 2]' [1 2] ``` -Read more about input and output flags [here](https://book.babashka.org/#_input_and_output_flags). +Read more about `*input*` and in- and output flags +[here](https://book.babashka.org/#_input_and_output_flags). Execute a script. E.g. print the current time in California using the `java.time` API: diff --git a/sci b/sci index 280865a9..79f905cc 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 280865a9850d3befd5239bf42b3aa016230bc0c4 +Subproject commit 79f905cc7cb2a323d080bec7805df0c9eb8e65d0 From d9aad85476376a2992aa15bb9e160a36ec3f95ab Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Mon, 19 Dec 2022 23:04:57 +0100 Subject: [PATCH 25/33] SCI: remove intermediate code for static method call --- sci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sci b/sci index 79f905cc..9707e306 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 79f905cc7cb2a323d080bec7805df0c9eb8e65d0 +Subproject commit 9707e3069931902dad76c7d209d55d9bd5b24492 From 62916fa292cfe7ea6211c765322611c235b9f8ac Mon Sep 17 00:00:00 2001 From: Matthew Downey Date: Tue, 20 Dec 2022 13:41:36 -0500 Subject: [PATCH 26/33] Fix #1451: Allow passing explicit file and line number to clojure.test --- src/babashka/impl/clojure/test.clj | 2 +- test/babashka/test_test.clj | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/babashka/impl/clojure/test.clj b/src/babashka/impl/clojure/test.clj index 422947a2..8903e911 100644 --- a/src/babashka/impl/clojure/test.clj +++ b/src/babashka/impl/clojure/test.clj @@ -297,7 +297,7 @@ current assertion." {:added "1.1"} [m] - (let [{:keys [:file :line]} (meta (first @testing-vars))] + (let [{:keys [:file :line]} (merge m (meta (first @testing-vars)))] (str ;; Uncomment to include namespace in failure report: ;;(ns-name (:ns (meta (first *testing-vars*)))) "/ " diff --git a/test/babashka/test_test.clj b/test/babashka/test_test.clj index 08a58249..b0ad6da5 100644 --- a/test/babashka/test_test.clj +++ b/test/babashka/test_test.clj @@ -112,3 +112,9 @@ (deftest line-number-test (is (str/includes? (bb "test-resources/line_number_test_test.clj") "line_number_test_test.clj:4"))) + +(deftest testing-vars-str-test + (is (str/includes? + (bb "(clojure.test/testing-vars-str {:file \"x\" :line 1})") + "() (x:1)") + "includes explicit line number + file name in test report")) From 935c8da5359dc6b3936e9c29f75e1de854597fc7 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Tue, 20 Dec 2022 19:43:23 +0100 Subject: [PATCH 27/33] Changelog + SCI update --- CHANGELOG.md | 4 ++++ sci | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13e87948..0b81ac96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ A preview of the next release can be installed from [Babashka](https://github.com/babashka/babashka): Native, fast starting Clojure interpreter for scripting +## Unreleased + +- [#1451](https://github.com/babashka/babashka/issues/1451): Allow passing explicit file and line number to clojure.test ([@matthewdowney](https://github.com/matthewdowney)) + ## 1.0.168 (2022-12-07) - `loop*`, `fn*` are now special forms and `loop`, `fn`, `defn`, `defmacro`, `and` and `or` are implemented as macros. This restores compatibility with [rcf](https://github.com/borkdude/hyperfiddle-rcf) diff --git a/sci b/sci index 9707e306..9293e65c 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 9707e3069931902dad76c7d209d55d9bd5b24492 +Subproject commit 9293e65c77a4c288e89a8f9d2988c678ef335b8b From 01eea0babbbbf1a8c88bb9b880b5a74c2ba82004 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Tue, 20 Dec 2022 19:48:18 +0100 Subject: [PATCH 28/33] changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b81ac96..cbedc7a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,12 @@ A preview of the next release can be installed from ## Unreleased +- Implement `ns`, `lazy-seq` as macro +- Support `--dev-build` flag in installation script - [#1451](https://github.com/babashka/babashka/issues/1451): Allow passing explicit file and line number to clojure.test ([@matthewdowney](https://github.com/matthewdowney)) +- [#1280](https://github.com/babashka/babashka/issues/1280): babashka REPL doesn't quit right after Ctrl-d ([@formerly-a-trickster](https://github.com/formerly-a-trickster) and Alice Margatroid) +- [#1446](https://github.com/babashka/babashka/issues/1446): add `pprint/code-dispatch` +- Update zlib to version `1.2.13` ([@thiagokokada](https://github.com/thiagokokada)) ## 1.0.168 (2022-12-07) From df24d04f73e2cc8034e669dcbb7961817e110c8f Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Wed, 21 Dec 2022 12:06:10 +0100 Subject: [PATCH 29/33] SCI: minor perf boost for zero args --- sci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sci b/sci index 9293e65c..7b2580b9 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 9293e65c77a4c288e89a8f9d2988c678ef335b8b +Subproject commit 7b2580b94f5285622a4a992c12fbe875fa231fe5 From 61950b87e289fc0891c4655d1f9db81002f32ab0 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Wed, 21 Dec 2022 12:28:47 +0100 Subject: [PATCH 30/33] SCI: faster field access --- sci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sci b/sci index 7b2580b9..4e3befa9 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 7b2580b94f5285622a4a992c12fbe875fa231fe5 +Subproject commit 4e3befa99858c57125a422edcf567345d57ba74d From 8b39f67700e5885d249bb3a9cf56e3bf8b0fd146 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Fri, 23 Dec 2022 14:32:13 +0100 Subject: [PATCH 31/33] SCI: cache Java interop methods (#1455) --- sci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sci b/sci index 4e3befa9..8884529f 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 4e3befa99858c57125a422edcf567345d57ba74d +Subproject commit 8884529f67c6af50a7d001211027f47ccc684775 From 68a6e2451624be3640b43c6c2f4ad915b9ba423f Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Fri, 23 Dec 2022 14:44:52 +0100 Subject: [PATCH 32/33] Fix #1454: include babashka process in print-deps output --- CHANGELOG.md | 1 + src/babashka/impl/print_deps.clj | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbedc7a6..473540ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ A preview of the next release can be installed from - [#1280](https://github.com/babashka/babashka/issues/1280): babashka REPL doesn't quit right after Ctrl-d ([@formerly-a-trickster](https://github.com/formerly-a-trickster) and Alice Margatroid) - [#1446](https://github.com/babashka/babashka/issues/1446): add `pprint/code-dispatch` - Update zlib to version `1.2.13` ([@thiagokokada](https://github.com/thiagokokada)) +- [#1454](https://github.com/babashka/babashka/issues/1454): Add `babashka.process` to `print-deps` output ## 1.0.168 (2022-12-07) diff --git a/src/babashka/impl/print_deps.clj b/src/babashka/impl/print_deps.clj index 45e2b3f8..0e9d0288 100644 --- a/src/babashka/impl/print_deps.clj +++ b/src/babashka/impl/print_deps.clj @@ -14,10 +14,11 @@ edn/read-string) deps (:deps deps) deps (assoc deps - 'babashka/fs {:mvn/version "0.1.2"} - 'babashka/babashka.curl {:mvn/version "0.1.1"} + 'babashka/fs {:mvn/version "0.2.12"} + 'babashka/babashka.curl {:mvn/version "0.1.2"} 'babashka/babashka.core {:git/url "https://github.com/babashka/babashka.core" - :git/sha "52a6037bd4b632bffffb04394fb4efd0cdab6b1e"}) + :git/sha "52a6037bd4b632bffffb04394fb4efd0cdab6b1e"} + 'babashka/process {:mvn/version "0.4.13"}) deps (dissoc deps 'borkdude/sci 'org.babashka/sci From 4223f1432d5414ebf75e2bdfcd8d349f5109fd8a Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sun, 25 Dec 2022 12:24:23 +0100 Subject: [PATCH 33/33] SCI sync --- sci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sci b/sci index 8884529f..92a07126 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 8884529f67c6af50a7d001211027f47ccc684775 +Subproject commit 92a071269f1a4e3f4fda262b33b47ec827be3d4e