A Clojure(Script) library providing complete instrumentation for clojure.spec, validating args, ret, and :fn specs.
Orchestra is a Clojure and ClojureScript library that provides complete instrumentation for clojure.spec. It extends Clojure's built-in spec instrumentation to validate not only function arguments but also return values and `:fn` specs, solving the problem of partial validation in development and testing environments.
Clojure and ClojureScript developers who use clojure.spec for data validation and want comprehensive runtime checking during development and testing.
Developers choose Orchestra because it offers a drop-in replacement for clojure.spec.test.alpha with full spec validation, ensuring all aspects of function specs are checked automatically, leading to more reliable and correct code.
Complete instrumentation for clojure.spec
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Validates :args, :ret, and :fn specs during instrumentation, unlike default clojure.spec which only checks arguments, ensuring thorough data shape enforcement.
Seamlessly replaces clojure.spec.test.alpha with minimal code changes—just update require statements, as shown in the README usage examples.
Provides a macro to define functions and specs together, encouraging spec adoption with support for docstrings, destructuring, and multiple arities, simplifying spec usage.
Recommended to be always enabled in development and testing, helping catch data shape errors in system tests and promoting robust code, per the README philosophy.
Validating all specs on every function call adds significant execution time, making it unsuitable for performance-critical production environments.
For multi-arity functions, :fn validators must account for arity tags, adding complexity and potential for errors, as admitted in the README's note on defn-spec.
Only useful if the project adopts clojure.spec; otherwise, it provides no value and introduces an unnecessary dependency.