- #449: Fix bad jsdoc
- Add
s/defprotocol
- #391: Improve
s/defaliaserror message when passed a schema that doesn't support metadata - #442: Add support for cross-platform JVM type hints (another attempt at fixing #174)
- #434: Fix API doc generation
- Fix
view sourcein API docs
- Prefer 1.3.4 (used to test the release process for schema)
- Babashka support
- CLJS: Add pretty
pr-strfor schemas
- Fix mutually recursive
s/letfnbindings - Fix
s/fnperf caveats in Clojure by avoiding wrappers - Fix conflict with key named
constructorin recent ClojureScript versions.
- BREAKING use
cljcinstead ofcljx, which requires Clojure 1.7 or later. (#425)
- Fixes a "wrong number of arguments" warning in clojurescript (#418)
- Fixes an issue with function name inference introduced in the previous release (#416)
- Improved the names of built-in predicate schemas in clojurescript production environments (#417)
- No longer swallows fatal exceptions on the JVM (#413)
- Wildcard keys in map schemas are internally amended in a way that fixes a bug in schema-generators
- Minor fixes for more recent ClojureScript versions
- Fix warnings in newer versions of ClojureScript around
aget,aset, anduuid.
- Fix bug introduced in 1.1.8 (#402).
- Improved errors for multimethods.
- Remove unnecessarily relative marker in
::schema.spec.collection/keywords to fix compatibility with latest Clojure 1.9 alpha.
- Add exclusions to workaround
->MapEntrywarnings with latest cljs.
- Add float type to JVM coercers.
- Highlights schema validation errors
- Fix an issue with
isa?and the global hierarchy - Fix an issue with coercion and map entries
- Make fn validation customizable by addition of
fn-validatorfunction
- Exclude
clojure.core/Instto avoid warnings in Clojure 1.9 alphas
- Fix (at least some) AOT issues around PSimpleCell/SimpleVCell, by replacing with atom/AtomicReference.
- *Deprecate schema.experimental.generators and schema.experimental.complete. Find them in their new home in the separate schema-generators project.
- BREAKING change the internal details of collection specs (should only be an issue for custom collection schemas that don't rely on helpers
one-elementorall-elements). - Fix generation for sequence schemas containing a non-trailing
s/optionalelement.
- Install a pprint method that uses the explain, in addition to an ordinary print-method. Should fix large prints and stack overflows while pprinting schemas, or with plugins such as
pretty.
- Fix completion through non-map collections
- Attempt to resolve issues with AOT compilation by moving typehint on
use-fn-validationvar to callsites. - Update generators, bump minimum version of test.check to 0.9.0. Generators will only work under Clojure 1.7.0+.
- Better performance for anonymous schematized functions, via lazy checker creation
- Fix warning about overriding
atomunder Clojure 1.7 - Fix behavior of
constrainedwith some schemas (e.g. maps).
- Extend keyword
enumcoercion to keywordeqcoercion - Add
s/atomschema for atoms - Add
coercer!which throws on error - Add leaf generators for UUIDs
- Make
s/defncompatible withwith-test - Add
constrainedschema for postconditions (replaces(both x (s/pred ...)))
- Catch and report exceptions in guards the same as preconditions, rather than allowing them to propagate out.
- New schema backend, which is faster, simpler, and more declarative, enabling more applications and simplifying tooling. Users of built-in schema types should experience very little or no breakage, but tooling or custom schema types will need to be updated. As a concrete example of an application that's enabled, schema now experimentally supports test-check style generation from schemas, as well as completion of partial inputs.
- BREAKING Changes to the core Schema protocol will break existing third-party schema tooling and schema types.
- BREAKING Records coerced to an ordinary (non-record) map schema are now converted to maps, rather than retaining their record type.
- Deprecate
s/eitherin favor ofs/cond-pre,s/conditional, orschema.experimental.abstract-map-schema. As of this release,eitherno longer works with coercion. - Deprecate
s/bothin favor of improveds/conditional. - Deprecate
schema.core/defrecord+; moved to newschema.potemkinnamespace. s/predcan more intelligently guess the predicate namerecordschemas can now coerce values to corresponding record types.- New experimental
abstract-map-schemathat models super/subclasses as maps. - Improved explains explains for leaf schemas, especially in Clojurescript.
- Fix ClojureScript warnings about
map->Recordconstructors being redefined. - Add queue schemas
- Configurable maximum length for values in error messages
- Fix potential memory leaks after many redefinitions of
s/defnors/defrecord.
- Fix longstanding AOT compilation issue when used with Clojure 1.7.0-RC1 and later.
- Add recursive schema support for ClojureScript
- Add ns metadata to defschema
- Fix some harmless warnings when using Schema with the latest version of ClojureScript (due to the addition of positional constructors for
deftype).
- BREAKING Remove support for old
^{:schema ..}style annotations.:- schemais the preferred way, but metadata-style schemas are still allowed for valid Clojure typehints. - BREAKING Remove support for bare
:- Protocolannotations (use:- (s/protocol Protocol)instead). - BREAKING Remove deprecated macros (
defn,defrecord, etc) from schema.macros. The identical versions in schema.core remain. - BREAKING Remove potemkin as a dependency, and the
*use-potemkin*flag. To get the old behavior of potemkin defrecords, you can still bring your own potemkin and useschema.core/defrecord+in place ofschema.core/defrecord.
- Add coercion handler for s/Uuid from string input
- Support java.util.List instances as valid data for sequence schemas
- Make primitive schemas work better in some cases under partial AOT compilation
- Fix bug in
defschemawhich clobbered metadata, breakings/protocolin Clojure in 0.3.2.
- Fix
s/protocolin Clojure (didn't work properly with extends created later) - Fix ClojureScript (Closure) warning about reference to global RegExp object.
- Add
set-compile-fn-validation!function to turn off emission of validation globally, and turn off emission of validation code for non- ^:always-validate functions when assert is false.
- Fix Clojurescript compilation warnings/errors from accidental references to
clojure.data/diffandclassinside error messages.
- BREAKING increase minimum clojurescript version 2120 to support :include-macros
- Deprecate direct use of
schema.macrosin client code -- prefer canonical versions inschema.corein both Clojure and ClojureScript, using:include-macros truein cljs. - Deprecate old
^{:s schema}syntax for providing schemas. - Deprecate
*use-potemkin*flag and behavior to default to potemkin s/defrecords in Clojure; in future releases, you will have to provide your own potemkin and explicitly opt-in to this behavior. - (Hopefully) fix issues with AOT compilation, by removing dependence on potemkin/import-vars.
- Add
isaschema for Clojure hierarchies. - Preserve the types of maps (including Records) when coercing with map schemas.
- Smarter code generation in s/defrecord to avoid dead code warnings
- Fix printed form of s/Str in ClojureScript
- Make some internal fns public to simplify third-part schema extensions
- Walking records with map schemas preserves the record type
- Proper explain for s/Str
- Memoize walker computation, providing much faster checker compilation for graph-structured schemas
- Add
normalized-defn-argshelper fn for definings/defn-like macros. - Map schemas correctly validate against struct-maps
- Fixed an issue that could cause ClojureScript compilation to fail
- Generalize
s/recursiveto work on artibrary refs - Add
s/Symbolas a cross-platfor primitive
- Improved explains for primitives & primitive arrays
- More robust double coercions
- Fix cljs warning about extending js/Function
- Import schema.macros/defmulti in schema.core
- Add validated
s/def. - Add validated
s/defmethod. - Add
Boolcoercions.
- Add
Boolto cross-platform primitives - Fix several minor bugs
- Replace cljs-test with headless clojurescript.test.
- breaking change: Cross-platform leaves String and Number are now Str and Num (the former caused warnings and broke AOT).
- Replaced core Schema protocol method
checkwithwalker, for increased speed and versatility - Support for schema-driven transformations/coercion
- Schemas for primitive arrays (
longs, etc) - Schematized
letfn
- Remove non-dev dependency on cljx
- Support for pre/postcondition maps in
s/defn - Support for recursive schemas in Clojure
- Fixes for sm/defn and sm/defrecord with cljs advanced compilation
- Works with advanced compilation in cljs (at least sometimes)
- More small bugfixes
- Better validation error messages in cljs
- Minor bugfixes (thanks various contributors)
- Extend schema protocol to regex (thanks AlexBaranosky).
- Add
:never-validatemeta option
- Fix regression in primitive handling introduced in 0.1.4
- Added Regex, Inst, and Uuid as primitive schema types (thanks jwhitlark)
- Add annotated arglists to functions defined with
s/defn(thanks danielneal) - Add
set-fn-validation!to schema.core, to globally turn validation on or off. - Add
:always-validatemetadata on fn/defn name to unconditionally use validation.
- Fix compatibility with Clojurescript 1889 (removal of format)
- Validate returns the value on success
- Sequence schemas only match sequential? things, to match map and set
- Implementation of
defschemaputs name in metadata, rather than generating named schema - Improved error messages and stack traces for
s/defn
- Bugfix: with-fn-validation persisting after Exception
- Initial release