JasperFx / lamar

Fast Inversion of Control Tool and Successor to StructureMap
https://jasperfx.github.io/lamar
MIT License
563 stars 118 forks source link

Error: Detected some kind of bi-directional dependency while trying to discover and plan a missing service registration #394

Open jasonshave opened 5 months ago

jasonshave commented 5 months ago

Describe the bug When I set up a minimal API to receive an Azure.Messaging.CloudEvent in my minimal API with Wolverine enabled, I get the exception on startup:

Detected some kind of bi-directional dependency while trying to discover and plan a missing service registration

To Reproduce Steps to reproduce the behavior:

  1. Install NuGet for Azure.Messaging with a .NET 7/8 web api project
  2. Install Wolverine and add the basic builder.Host.UseWolverine();
  3. Create a MapPost endpoint with the following signature:

app.MapPost("/api/callbacks", (CloudEvent[] events) =>{});

  1. Run the app and observe the exception

Expected behavior The web app should load correctly. If I remove the Wolverine statement it starts up no problem.

Desktop (please complete the following information):

jeremydmiller commented 5 months ago

Answering on discord

jeremydmiller commented 5 months ago

I think this is a Lamar thing, and I'm moving this there. I also know what the fix is.

But I'm blaming the ASP.Net Core team anyway:)