Skip to content
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

Close #1124: only assume string interning in cljs #1125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
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: No status
Development

Successfully merging this pull request may close these issues.

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