Fork me on GitHub
#cherry
<
2024-04-20
>
ikitommi12:04:55

When updating malli dependencies, Cherry got updated from 0c4e0d1de534a4cf910ed7079638dbcfec8ec8b7 to 3f78c7e03e1b940c0cbc05e8c5bc76f8295055cb, breaking the sci-tests. Seems like the namespace aliases don’t work as expected. Using this config:

(defn -default-sci-options []
  {:preset :termination-safe
   :aliases {'str 'clojure.string
             'm 'malli.core}
   :namespaces {'malli.core {'properties properties
                             'type type
                             'children children
                             'entries entries}}})
any ideas what has changed and how to mitigate?

borkdude12:04:57

interesting...

borkdude12:04:26

can you log an issue with SCI? I'll take a look on Monday

borkdude12:04:43

preferably a SCI-only repro if possible

ikitommi12:04:26

I’ll do that

borkdude09:04:02

@U055NJ5CC alright, I'll wait for the issue

borkdude09:04:35

@U055NJ5CC is it about this failing test? https://github.com/metosin/malli/actions/runs/8764828329/job/24055235948 I don't see how this is related to SCI though

borkdude09:04:14

it's probably a cherry issue, I'll take a look later today

ikitommi09:04:35

it’s just using SCI under Cherry.

borkdude09:04:11

SCI under cherry?

borkdude09:04:22

I'm confused

ikitommi12:04:51

the failing code uses m/eval, e.g.

(m/eval "(m/properties [int? {:district 9}])")
doesn’t work anymore with cherry.

borkdude12:04:11

yes, but how does that relate to SCI?

borkdude12:04:34

I'll take a look regardless, doesn't matter

ikitommi13:04:44

thanks! m/eval uses SCI to evaluate the code, to be honest, I have no idea how that works with cherry.

borkdude13:04:51

it only uses SCI if you enable SCI. If you enable cherry, m/eval evaluates through cherry only:

(defn eval
  ([code] (eval code nil))
  ([code _opts]
   (cond (or (symbol? code)
             (seq? code))
         (cherry/eval-form code cherry-opts)
         (string? code)
         (cherry/eval-string code cherry-opts)
         :else code)))

(set! malli.core/eval eval)

borkdude13:04:00

That code is in malli.cherry

👌 2
borkdude13:04:08

I'll take a look right now

borkdude14:04:39

should be fixed with cherry main branch now, sorry for the inconvenience