fmgasparino / google-gin

Automatically exported from code.google.com/p/google-gin
Apache License 2.0
0 stars 0 forks source link

GIN does not detect circular dependency in binds #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create simple class Foo that injects Bar
2. create simple class Bar that injects Foo
3. set up binds for Foo and Bar in your GinModule
4. call injector.getFoo()
5. get a stack overflow error

What is the expected output? What do you see instead?
I would like it if GIN discovered the circular dependency and inform user
during exception in injection.  Seems like it would be helpful in more
complicated cases and better than running the circuit until overflow.

What version of the product are you using? On what operating system?
Linux

Original issue reported on code.google.com by martinl...@gmail.com on 29 Oct 2008 at 12:20

GoogleCodeExporter commented 9 years ago
Thanks for these reports. I have seen this issue myself when I was working on 
the 
sample application. If it helps, I resolved my instance of the problem by 
breaking it 
up with a Provider.

Original comment by robbie.v...@gmail.com on 29 Oct 2008 at 12:34

GoogleCodeExporter commented 9 years ago
Robbie fixed this in r60.

Original comment by bstoler+code@google.com on 28 Dec 2008 at 12:52