All notable changes to this project will be documented in this file.
- Unreachable
SmartCore::Container::ArbitraryLock
(rewritten withSmartCore::Engine::ReadWriteLock
);
- Simple
Mutex
-based locks was replaced withSmartCore::Engine::ReadWriteLock
in order to decrease context switching during method resolving inside RubyVM (reduced thread lock acquire count); - Development progress:
- Minimal ruby version - 2.5;
- Updated development dependencies;
- Updated
smart_engine
dependency (~> 0.11
->~> 0.17
);
- Support for Ruby@3;
- Updated development dependencies;
- No more TravisCI (todo: migrate to Github Actions);
- Minimal
smart_engine
version: 0.11.0 (in order to support Ruby@3);
- Core
- refactored
SmartCore::Container::Entities::NamespaceBuilder
andSmartCore::Container::Entities::DependencyBuilder
(from stateful-based logic on instances to stateless-based logic on modules);
- refactored
- Subscription to the nested dependency changement doesn't work (incomplete nested dependency path in watcher notification);
- An ability to observe dependency re-registrations:
#observe(path, &observer) # => observer object
- listen specific dependency path;#unobserve(observer)
- unsubscribe concrete observer object;#clear_observers(path = nil)
- unsubscribe specific listenr or all listeners (nil
parameter);
SmartCore::Container.define {}
- an ability to avoid explicit class definition that allows to create container instances from an anonymous container class imidietly
- Missing memoization flag
:memoize
for runtime-based dependency registration:memoize: false
by default;- signature:
SmartCore::Container#register(dependency_name, memoize: false, &dependency)
- Key predicates (
#key?(key)
,#dependency?(path, memoized: nil/true/false)
,#namespace?(path)
);
#keys(all_variants: false)
- return a list of dependency keys (all_variants: true
is mean "including namespace kaeys");#each_dependency(yield_all: false) { |key, value| }
- iterate over conteiner's dependencies (yield_all: true
will include nested containers to iteration process);
SmartCore::Container::ResolvingError
class has incorrect message attribute name;
- Dependency resolving is not memoized by default (previously: totally memoized 😱);
- (Private API (
SmartCore::Container::RegistryBuilder
)) improved semantics:build_state
is renamed toinitialise
;build_definitions
is renamed todefine
;
- (Public API) Support for memoized dependencies (all dependencies are memoized by default);
- Release :)