Closed
Description
I upgraded to Orleans 1.4.0, and got an error from Autofac, which I use as my DI framework with Orleans instead of the default Microsoft DI. When starting the Silo host, Autofac complains:
Circular component dependency detected: Orleans.GrainFactory -> System.IServiceProvider -> System.IServiceProvider.
And then the silo refuses to start. It seems Microsoft DI is more forgiving, returning services.BuildServiceProvider() instead of AutofacServiceProvider(builder.Build()) with the exact same registrations results in a succesful start of the silo.
Runtime/OutsideRuntimeClient.cs line 110 reads:
services.AddSingleton(sp => sp);
My guess is that Autofac does not like that, it seems circular indeed so I guess this causes the bug. I'm not sure why that line is there; it seems it can be safely deleted?
Metadata
Assignees
Labels
No labels