Fork me on GitHub
#malli
<
2021-08-03
>
vlaaad08:08:18

Hi! Is there a malli equivalent of s/keys* ?

ikitommi09:08:54

Not yet, I guess the could be...

vlaaad08:08:09

side note:

(let [s [:catn [:rest [:? any?]]]]
  (m/unparse s (m/parse s [])))
=> [nil] ;; should be []

ikitommi09:08:01

Oh, it's a bug, issue /& PR welcome!

Ben Sless08:08:21

Any idea how to make the transformer tests not rely on map order? https://github.com/metosin/malli/pull/497

ikitommi09:08:23

@ben.sless looks great! Commented the PR, ideas about the order & stuff

Noah Bogart15:08:45

how do i do this?

(def PhaseStepSchema
  (mu/merge
    BaseStepSchema
    [:map {:closed true}
     [:phase qualified-keyword? {:namespace :phase}]]))

Noah Bogart15:08:37

i want the :phase value to be a namespace-qualified keyword, with the namespace :phase , aka :phase/action

Noah Bogart16:08:39

solution i found: [:phase [:qualified-keyword {:namespace :phase}]]

Ben Sless17:08:05

I came across an extremely weird phenomenon which I don't think should happen

1. Unhandled java.lang.VerifyError
   Stack map does not match the one at exception handler 1251 Exception
   Details: Location:
   malli/core_test$fn__30148$fn__32525.invoke()Ljava/lang/Object; @1251:
   astore_3 Reason: Type 'java/lang/Throwable' (current frame,
   locals[6]) is not assignable to 'clojure/lang/Keyword' (stack map,
   locals[6]) Current Frame: bci: @1175 flags: { } locals: {
   'malli/core_test$fn__30148$fn__32525',
   'clojure/lang/IPersistentVector', null, null, 'java/lang/Object',
   null, 'java/lang/Throwable' } stack: { 'java/lang/Throwable' }
   Stackmap Frame: bci: @1251 flags: { } locals: {
   'malli/core_test$fn__30148$fn__32525',
   'clojure/lang/IPersistentVector', 'java/lang/Object', null,
in accumulating errors #84 Will try another JVM version

Ben Sless17:08:06

This happens in the same test, on both Java 15 and 11, only after I run it twice

Ben Sless17:08:49

Happens on java 8, too