needle
needle copied to clipboard
Feature Request: Handle inheritance with Dependencies
When a dependency is declared that is used by some Component in the system, it must directly inherit from NeedleFoundation.Dependency
. You can't have some other dependency and then add to it by using it as a parent. Would be nice if needle looked at protocol inheritance and considered the union of all the properties.
Note: This is unlikely to make it in 1.0. Would be nice to add this in 1.1.
As discussed today, we might introduce a new "dependency packs" concept, such as the following:
public protocol MyBaseDependencyPacks: DependencyPacks {
var commonObj1: Obj1 { get }
var commonObj2: Obj2 { get }
var commonObj3: Obj3 { get }
var commonObj4: Obj4 { get }
}
public protocol SomeScopeDependency: Dependency, MyBaseDependencyPacks {
var anObjectOnlyNeededAtThisScope: Obj { get }
}
Hello there. It's been a while after last update about this question (as I have the same) and I see that DependencyPacks
marked as "Not planned". Did you drop this idea at all, or decided to implement it in different way?
Is there any update on this feature request by any chance? Do you live without by copy/pasting or is there a smarter suggested workaround?