Comments (5)
Turns out I'll probably not implement this feature after all. If anyone absolutely wants to implement it and sends a pull request with good implementation and tests, I'll probably merge that, but I'm mostly of the opinion that a real binding solution should be used here, instead.
from swiftsuspenders.
Hi,
Just for the record, I don't think a general circular case such as A needs B, B needs C and C needs A should fit with a binding solution. Indeed, binding to me would be the case where A needs B and B needs A, thus both direction.
Thanks for your great work,
from swiftsuspenders.
I'd like to add that a setter injection that supports circular injection as in Spring could be interesting :-)
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html#d0e2299
from swiftsuspenders.
I'd like to add that a setter injection that supports circular injection as in Spring could be interesting :-)
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html#d0e2299
While I agree that having support for circular dependencies would be
handy, supporting it would require a major rewrite of core parts of
Swiftsuspenders. I'm very unlikely to do this rewrite, so I'm afraid
this isn't going to happen, sorry.
from swiftsuspenders.
Hi,
circular dependencies are supported in mvcExpress. Currently it is on the branch : release_1.0
MindScriptAct/mvcExpress-framework@9e15e2e
My approach is simple - if dependency is not satisfied AND pending injection feature is enabled - injection goes to pending dependencies registry.
If dependency is set in fixed(can be changed) time frame... all is well.. if not - error is thrown.
By default I disable the feature because some nasty synchronization problem might occur if programmer does not know what he is doing...
Maybe it will help.
cheers.
from swiftsuspenders.
Related Issues (20)
- Named injections, map.toValue(null), satisfies() and getInstance() HOT 6
- Metadata.xml HOT 5
- loggable warning HOT 4
- Reflector HOT 1
- Support destruction of instances and teardown of entire containers HOT 21
- Building the SWC HOT 7
- ApplicationDomain::getDefinition Explodes Fantastically HOT 1
- Teardown nulls the _mappings dict
- DescribeTypeReflector VerifyError: Error #1068: String and * cannot be reconciled. HOT 3
- Asymmetry between satisfies & satisfiesDirectly HOT 2
- More specific InjectorError sub types HOT 4
- Null values passed to Injected constructor with multiple name-quailified injections HOT 13
- Can't build with Maven HOT 3
- Versioning HOT 6
- Feature Request -- "Mapping"-specific injections
- InstantiateUnmapped Performance HOT 2
- Injector still needs an interface ... HOT 6
- docs HOT 1
- Updated build script to preserve code comments in SWC HOT 2
- No issue , is suggest HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftsuspenders.