All notable changes to this project will be documented in this file.
- Reduced object allocation count inside the type validation logic (updated
smart_types
to~> 0.8
); - Support for [email protected] and [email protected] has ended;
- Updated development dependencies;
- Updated
smart_engine
dependency with aSmartCore::Engine::ReadWriteLock
fixes;
- Reduced context switching count during lock operations (migrate from
SmartCore::Engine::Lock
toSmartCore::Engine::ReadWriteLock
);
- Reduced object allocations and mutex usage:
- only one mutex of
SmartCore::Schema::Checker
instance is enough cuz this mutex covers the entire validation process; - more retained objects in
SmartCore::Schema::Checker::Rules
(cache layer for rule names);
- only one mutex of
- Updated development dependencies;
- Updated
smart_engine
dependency (~> 0.11
->~> 0.13
);
- Started the total code refactoring in order to decrease object and memory allocations:
- Decreased object allocations in
SmartCore::Schema::Checker::VerifiableHash#fetch(key)
- Decreased object allocations in
- Now
Forwardable
module has explicit requiring in order to support [email protected] (lib/smart_core/smart_schema.rb#6
);
- Updated
smart_types
dependency (~> 0.4.0
) to guarantee Ruby@3 compatability;
- Support for Ruby@3;
- No more
TravisCI
(TODO: migrate toGitHub Actions
); - Updated development dependencies;
- Support for strict and non-strict schemas;
strict!
DSL directive marks your schema as a strict schema (your hash can not have extra keys);non_strict!
DSL directive marks your schema as non-strict schema (your hash can have extra keys);- use
strict!
in any schema's context place to mark your current schema context as a strict; - use
non_strict
in any schema's context place to mark your current schema context as a strict; - use
schema(:strict)
to globally define strict schema (default behavior); - use
schema(:non_strict)
to globally define non-strict schema; - nested schemas inherits strict behavior from outer schemas;
- root schema is
:strict
by default; - schema reopening without mode attribute does not change original schema mode (you should manually pass a mode attribute to redefine already defined schema mode);
#errors
now includes#extra_keys
too (:extra_key
error code for each extra key);- Unfreezed
SmartCore::Schema::Checker::Rules::TYPE_ALIASES
for extendability (untilsmart_type-syste
has been integrated);
- Release :)