-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:merge
broken in CLJS
#1169
Comments
Hi, could you provide a full trace and error message please? |
Sure! Here it is: $ npx shadow-cljs node-repl
shadow-cljs - config: /Users/simon/Tmp/repro-cljs-merge/repro-cljs-merge/shadow-cljs.edn
shadow-cljs - updating dependencies
shadow-cljs - dependencies updated
shadow-cljs - server version: 2.28.21 running at http://localhost:9630
shadow-cljs - nREPL server started on port 52322
cljs.user=>
shadow-cljs - #4 ready!
cljs.user=> (require '[malli.core :as malli])
nil
cljs.user=> (malli/validate [:merge
[:map [:a :int]]
[:map [:b :int]]]
{:a 123 :b 124})
REPL Invoke Exception cljs$core$ExceptionInfo [Error]: :malli.core/invalid-schema
at new cljs$core$ExceptionInfo (/Users/simon/Tmp/repro-cljs-merge/repro-cljs-merge/.shadow-cljs/builds/node-repl/dev/out/cljs-runtime/cljs/core.cljs:11778:11)
at Function.cljs$core$IFn$_invoke$arity$3 (/Users/simon/Tmp/repro-cljs-merge/repro-cljs-merge/.shadow-cljs/builds/node-repl/dev/out/cljs-runtime/cljs/core.cljs:11805:1)
at Function.cljs$core$IFn$_invoke$arity$2 (/Users/simon/Tmp/repro-cljs-merge/repro-cljs-merge/.shadow-cljs/builds/node-repl/dev/out/cljs-runtime/cljs/core.cljs:11808:16)
at Object.malli$core$_exception [as _exception] (/Users/simon/Tmp/repro-cljs-merge/repro-cljs-merge/.shadow-cljs/builds/node-repl/dev/out/cljs-runtime/malli/core.cljc:157:31)
at Function.cljs$core$IFn$_invoke$arity$2 (/Users/simon/Tmp/repro-cljs-merge/repro-cljs-merge/.shadow-cljs/builds/node-repl/dev/out/cljs-runtime/malli/core.cljc:161:23)
at Object.malli$core$_lookup_BANG_ [as _lookup_BANG_] (/Users/simon/Tmp/repro-cljs-merge/repro-cljs-merge/.shadow-cljs/builds/node-repl/dev/out/cljs-runtime/malli/core.cljc:286:10)
at Function.cljs$core$IFn$_invoke$arity$2 (/Users/simon/Tmp/repro-cljs-merge/repro-cljs-merge/.shadow-cljs/builds/node-repl/dev/out/cljs-runtime/malli/core.cljc:2255:32)
at Function.cljs$core$IFn$_invoke$arity$2 (/Users/simon/Tmp/repro-cljs-merge/repro-cljs-merge/.shadow-cljs/builds/node-repl/dev/out/cljs-runtime/malli/core.cljc:2323:13)
at Function.cljs$core$IFn$_invoke$arity$3 (/Users/simon/Tmp/repro-cljs-merge/repro-cljs-merge/.shadow-cljs/builds/node-repl/dev/out/cljs-runtime/malli/core.cljc:2331:5)
at Function.cljs$core$IFn$_invoke$arity$2 (/Users/simon/Tmp/repro-cljs-merge/repro-cljs-merge/.shadow-cljs/builds/node-repl/dev/out/cljs-runtime/malli/core.cljc:2329:5) {
data: {
meta: null,
cnt: 3,
arr: [ [Object], [Object], [Object], [Object], [Object], [Object] ],
__hash: null,
'cljs$lang$protocol_mask$partition0$': 16647951,
'cljs$lang$protocol_mask$partition1$': 401412
},
cause: null,
description: undefined,
number: undefined,
fileName: undefined,
lineNumber: undefined,
columnNumber: undefined
} {
meta: null,
cnt: 6,
arr: [
{
ns: null,
name: 'type',
fqn: 'type',
_hash: null,
'cljs$lang$protocol_mask$partition0$': 2153775105,
'cljs$lang$protocol_mask$partition1$': 4096
},
{
ns: 'repl',
name: 'invoke',
fqn: 'repl/invoke',
_hash: null,
'cljs$lang$protocol_mask$partition0$': 2153775105,
'cljs$lang$protocol_mask$partition1$': 4096
},
{
ns: null,
name: 'name',
fqn: 'name',
_hash: null,
'cljs$lang$protocol_mask$partition0$': 2153775105,
'cljs$lang$protocol_mask$partition1$': 4096
},
'<eval>',
{
ns: null,
name: 'js',
fqn: 'js',
_hash: null,
'cljs$lang$protocol_mask$partition0$': 2153775105,
'cljs$lang$protocol_mask$partition1$': 4096
},
'malli.core.validate.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"merge","merge",-1804319409),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"map","map",1371690461),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"a","a",-2123407586),new cljs.core.Keyword(null,"int","int",-1741416922)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"map","map",1371690461),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"b","b",1482224470),new cljs.core.Keyword(null,"int","int",-1741416922)], null)], null)], null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"a","a",-2123407586),(123),new cljs.core.Keyword(null,"b","b",1482224470),(124)], null))',
{
ns: null,
name: 'source',
fqn: 'source',
_hash: null,
'cljs$lang$protocol_mask$partition0$': 2153775105,
'cljs$lang$protocol_mask$partition1$': 4096
},
'(malli/validate [:merge\n' +
' [:map [:a :int]]\n' +
' [:map [:b :int]]]\n' +
' {:a 123 :b 124})',
{
ns: null,
name: 'source-map-json',
fqn: 'source-map-json',
_hash: null,
'cljs$lang$protocol_mask$partition0$': 2153775105,
'cljs$lang$protocol_mask$partition1$': 4096
},
'{"version":3,\n' +
' "file":"<eval>",\n' +
' "sources":["<eval>"],\n' +
' "lineCount":4,\n' +
' "mappings":\n' +
' "AAAA,+BAAA,mFAAA,wDAAA,mFAAA,mDAAA,mFAAA,gDAAA,oEAAA,mFAAA,mDAAA,mFAAA,+CAAA,4EAAA,2CAAA,gDAAA,MAAA,+CAAA,39BAACA",\n' +
' "names":["malli.core/validate"],\n' +
' "sourcesContent":\n' +
' ["(malli/validate [:merge\\n [:map [:a :int]]\\n [:map [:b :int]]]\\n {:a 123 :b 124})"]}\n',
{
ns: null,
name: 'warnings',
fqn: 'warnings',
_hash: null,
'cljs$lang$protocol_mask$partition0$': 2153775105,
'cljs$lang$protocol_mask$partition1$': 4096
},
{
meta: null,
cnt: 0,
shift: 5,
root: [Object],
tail: [],
__hash: null,
'cljs$lang$protocol_mask$partition0$': 167666463,
'cljs$lang$protocol_mask$partition1$': 401412
}
],
__hash: null,
'cljs$lang$protocol_mask$partition0$': 16647951,
'cljs$lang$protocol_mask$partition1$': 401412
}
Execution error (ExceptionInfo) at (<cljs repl>:1).
:malli.core/invalid-schema
:repl/exception!
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello there,
I get the following exception while attempting to use
:merge
in cljs on malli 0.17.0. Am I doing something wrong or is there an issue with the library?Thank you!
Simon
The text was updated successfully, but these errors were encountered: