All notable changes to this project will be documented in this file.
- Support for Ruby@2.5 and Ruby@2.6 has ended;
- Reduced object allocation count during type checking process;
- Removed useless
Incorrect typetext part fromSmartCore::Initializer::IncorrectTypeErrorexception message; - Updated development dependencies;
SmartCore::Engine::ReadWriteLockis used insteadSmartCore::Engine::Lockin order to decrease the count of RubyVM's context switching and useless Mutexes usage;- reduced
KeyError-exception flow use cases in some cases inside the framework internals (in order to reduce object allocations under the hood); - bumped development dependencies;
- bumped core dependencies (in order to use
ReadWiteLock(and actualize available inner-framework features);
finalizenow accepts lambdas with arity-2. For example->(a, *b) {}or:freeze.to_procwhich inRuby >= 3returns lambda with arity equal to-2.
:finalizeblock is not invoked on theoptionwithoptional: trueflag;
- New options for option and param attributes:
- Support for attribute aliasing (
:asparameter);- supports:
option,param;
- supports:
- Support for attribute auto-casting (
:auto_castparameter);- supports:
option,param;
- supports:
- Support for mutable attributes (
:mutableparameter) with type-validation inside;- supports:
option,options,param,params;
- supports:
- Support for optional attributes (
:optionalparameter);- supports:
option;
- supports:
- Support for attribute aliasing (
- SmartCore::Initializer::Configuration:
- Configuration setting
strict_optionsnow works separately "per-class" in all configs manner (each class shares the global state but has own state too) - Support for per-class/global
:auto_castconfiguration;- provides a global/per-class behavior for
:castoption (falseby default);
- provides a global/per-class behavior for
- Configuration setting
optionsdeclaration now supportsprivacyoption;paramsdeclaration now supportsprivacyoption;
- Drop support of Ruby@2.4;
:defaultattribute parameter now duplicates the passed value during object instantiation;:defaultattribute parameter only works withoptionattribute (paramcan't havedefaultparameter now);- Attribute values generated by
:finalizeare type-validated now too; - Now lambda-based
:finalizeattributes are being checked for the signature during attribute declaration; - Some error messages have become more readable;
sendmethod overlaping/rewriting: otions and params named assendbreaks the internal framework-related invocations of the attribute definitioning inside the custom object constructor (this name rewrites internal Ruby'ssendmethod and brokes some things);
strict_optionsconfig option for non-strict checking of passed options;
- Validation messages for incorrect attribute types;
- Updated
smart_typesdependency (~> 0.4.0) to guarantee Ruby@3 compatibility; - Updated development dependencies;
- Support for Ruby 3;
- Moved from
TravisCIto nothing (todo: migrate toGitHub Actions). Temporary: we must run test cases locally. - Updated development dependencies;
- Deeply inherited entities lose their
__initializer_settings__entitiy;
- Deeply inherited entities lose their class attribute definers;
extend_initialization_flowalias method forSmartCore::Initializer.ext_init;- Access methods to the instance attribute lists (
#__params,#__options__,#__attributes__);
- Updated development dependencies;
- Constructor: disallow unknown option attributes;
- Release :)