Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Handle inheritance with Dependencies #149

Open
rudro opened this issue Aug 24, 2018 · 4 comments
Open

Feature Request: Handle inheritance with Dependencies #149

rudro opened this issue Aug 24, 2018 · 4 comments
Labels
Not planned Not being worked on unless something changes

Comments

@rudro
Copy link
Contributor

rudro commented Aug 24, 2018

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.

@rudro
Copy link
Contributor Author

rudro commented Aug 24, 2018

Note: This is unlikely to make it in 1.0. Would be nice to add this in 1.1.

@neakor
Copy link
Contributor

neakor commented Jan 31, 2019

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 }
}

@neakor neakor added Not planned Not being worked on unless something changes and removed Planned for v0.10.0 labels Apr 26, 2019
@dehrom
Copy link

dehrom commented Oct 17, 2021

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?

@aurelienp
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Not planned Not being worked on unless something changes
Projects
None yet
Development

No branches or pull requests

4 participants