Skip to content

Conversation

@frenchy64
Copy link
Collaborator

Close #1124

I think the string interning is for JS dead-code elimination purposes. This doesn't work in bb and I'm not sure if other platforms guarantee string interning. Since there isn't much (any?) benefit, perhaps we could use the safer = on other platforms.

I'm not sure how to test CLJS and verify the js bundle size.

$ bb -Dmalli.registry/mode=strict
Babashka v1.12.194 REPL.
Use :repl/quit or :repl/exit to quit the REPL.
Clojure rocks, Bash reaches.

user=> (System/getProperty "malli.registry/mode")
"strict"
user=> (require 'malli.core)
nil
user=> (malli.registry/-schemas (malli.registry/custom-default-registry))
{}
user=>
$ clj -J-Dmalli.registry/mode=strict
Clojure 1.11.4
user=> (System/getProperty "malli.registry/mode")
"strict"
user=> (require 'malli.core)
nil
user=> (malli.registry/-schemas (malli.registry/custom-default-registry))
{}

@frenchy64 frenchy64 marked this pull request as ready for review November 21, 2024 22:56
@frenchy64 frenchy64 added the bug Something isn't working label Nov 21, 2024
@ikitommi
Copy link
Member

makes sense, thanks!

@ikitommi ikitommi merged commit f8c6a9a into metosin:master Nov 23, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

malli.registry/{mode,type} not respected in Babashka

2 participants