babashka

richiardiandrea 2026-02-10T20:59:44.460009Z

Hi all! Has anybody ever encountered this error when requiring malli?

Type:     java.lang.IllegalArgumentException
Message:  No matching clause: java.time.temporal.TemporalQuery
Location: malli/experimental/time/transform.cljc:16:6

richiardiandrea 2026-02-10T21:04:21.774869Z

Probably some class is missing from that namespace

babashka.impl.reify2/reify-fn                      - <built-in>
clojure.core/reify*                                - <built-in>
malli.experimental.time.transform/->temporal-query - malli/experimental/time/transform.cljc:16:6
malli.experimental.time.transform/->temporal-query - malli/experimental/time/transform.cljc:14:1
malli.experimental.time.transform/->parser         - malli/experimental/time/transform.cljc:24:15

borkdude 2026-02-10T21:05:28.384839Z

I guess nobody tried to evaluate this before?

richiardiandrea 2026-02-10T21:05:56.413749Z

yep - not a problem - that's an experimental namespace anyway

richiardiandrea 2026-02-10T21:06:09.656809Z

I'll see what can be done there

borkdude 2026-02-10T21:06:39.320879Z

we can add support for this:

(defn ->temporal-query ^TemporalQuery [f]
     (reify TemporalQuery
       (queryFrom [_ t]
         (f t))))

borkdude 2026-02-10T21:06:56.659689Z

but all reify cases are hardcoded, this is why you see the error

richiardiandrea 2026-02-10T21:07:14.187499Z

yeah I just opened that malli namespace in front of me

borkdude 2026-02-10T21:07:28.990509Z

open an issue and I can take a look tomorrow

❤️ 1
richiardiandrea 2026-02-10T21:11:06.829109Z

Here you go https://github.com/babashka/babashka/issues/1923

borkdude 2026-02-12T22:34:07.213359Z

all working now. please test the dev build

richiardiandrea 2026-02-12T22:46:33.583489Z

ok thank you will do 😄

richiardiandrea 2026-02-12T22:58:09.429389Z

Ok I think I got past that - now I have another question - is https://github.com/juxt/tick currently bb compatible?

richiardiandrea 2026-02-12T22:58:24.079839Z

actually I am here - let me try to require it

richiardiandrea 2026-02-12T22:58:47.984419Z

ok yes it is

richiardiandrea 2026-02-12T22:59:25.903379Z

(require '[tick.core :as t])
nil
user> (require '[clj-time.format :as ctf])
java.lang.Exception: Unable to resolve classname: org.joda.time.ReadablePartial hammer.x-force.domain.audit clj_time/core.clj:92:3
This code is messy - I think I'll have to avoid requiring clj-time.formatin bb

richiardiandrea 2026-02-12T22:59:43.642249Z

but thanks both mallli and tick seem to work nicely!

borkdude 2026-02-12T23:00:20.973999Z

yeah clj-time isn't supported

richiardiandrea 2026-02-12T23:00:35.786619Z

I mean - better to have joda out of the mess 😄

richiardiandrea 2026-02-12T23:00:52.659609Z

but this is the classic clojure project where you have all three 😄

richiardiandrea 2026-02-12T23:01:03.461069Z

#?(:clj
   (defn- -utc-date-time-string?
     [x]
     (try (ctf/parse (ctf/formatters :date-time) x)
          (catch #?(:cljs :default :clj Exception) _))))