Releases: ivlevAstef/DITranquillity
Fix Deadlock in SwiftLazy library
- Update SwiftLazy library to version 1.3.0 for fix deadlock in Lazy https://github.com/ivlevAstef/SwiftLazy/releases/tag/v1.3.0
Support Variadic types/generics
-
Support Variadic types/generics: https://github.com/apple/swift-evolution/blob/main/proposals/0398-variadic-types.md
Now register and injection have infinity paramaters after swift 5.9 version. -
Improve changes from 4.3.4 release. Now your can simplify use two modificators:
Old:container.register { Cat(name: arg($0), owner: many($1), home: $2) }
New:container.register(Cat.init) { (arg($0), many($1)) }
Work only with swift 5.9+ version.
Root Components
Add new safety idea - root components. For more information your can see link
Remove SpinLock
Remove SpinLock and increase minimum OS version
fix makeGraph while use container hierarchy
Simplifying a particular case
Add simple one modificator injection into initialize method. For example:
Old: container.register { Cat(name: arg($0), owner: $1, home: $2) }
New: container.register(Cat.init) { arg($0) }
Argument injection with Tag or Name
Fix argument injection for Tag and named resolve. for example:
container.register { MyClass(inj: arg($0)) }
.as(name: "Name", MyProtocol.self)
.as(tag: MyTag.self, MyProtocol.self)
let arg = AnyArgument(type: MyProtocol.self, value: 1)
let obj1: MyProtocol = container.resolve(name: "Name", arguments: arg)
let obj2: MyProtocol = by(tag: MyTag.self, on: container.resolve(arguments: arg))
Fix resolve with arguments use none base type
Fix arguments resolve if for resolve used none base type. for example: let a: T? = container.resolve(args: ...)
. In current example T
is Optional
. Also fix if T
use many or tag.
Update Arguments API
Fix potential crash into FastLock
Fix potential crash into FastLock. For more information saw: ivlevAstef/SwiftLazy#6