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

explicitly disabling sci & sci options, fixes #276 #277

Merged
merged 4 commits into from Oct 12, 2020
Merged

Conversation

ikitommi
Copy link
Member

@ikitommi ikitommi commented Oct 11, 2020

Option 2 for #276. A non-breaking change (opposed to option1).

Disabling sci:

(m/validate [:fn 'int?] 1)
; => true

(m/validate [:fn 'int?] 1 {::m/disable-sci true})
; Execution error
; :malli.core/sci-not-available {:code int?}

Custom sci options:

(m/validate [:fn '(fn [x] (< x (last (range 10))))] 1)
; => true

(m/validate [:fn '(fn [x] (< x (last (range 10))))] 1 {::m/sci-options {:realize-max 1}})
; => false

@ikitommi ikitommi added the Clojurists Together Sponsored by Clojurists Together Q3 2020 label Oct 11, 2020
@ikitommi ikitommi changed the title optional sci via a hacky flag, fixes #276 optional sci via flag, fixes #276 Oct 11, 2020
@ikitommi ikitommi changed the title optional sci via flag, fixes #276 explicitly disabling sci, sci options, fixes #276 Oct 11, 2020
@ikitommi ikitommi changed the title explicitly disabling sci, sci options, fixes #276 explicitly disabling sci & sci options, fixes #276 Oct 11, 2020
@miikka
Copy link
Contributor

miikka commented Oct 12, 2020

Doing this still keeps the door open for a breaking change

@ikitommi ikitommi merged commit 228a3a3 into master Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clojurists Together Sponsored by Clojurists Together Q3 2020
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants