dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.91k stars 476 forks source link

Change the source layout for integrations #6517

Open davidfowl opened 3 weeks ago

davidfowl commented 3 weeks ago

Now that we have better nomenclature for integrations we should change the repo layout to match the product. We should have src/Integrations folder but within it we have a few options:

  1. Make all of the integrations top level in the Integrations folder, both client and hosting integration live side by side.
  2. Try to group integrations by the integration software (e.g. kafka) src/Integrations/Kafka/Aspire.Hosting.Kafka, src/Integrations/Kafka/Aspire.Confluent.Kafka.
  3. More options that I haven't thought about.

It would also be a chance to figure out if we should move the tests as well. Keeping each integration "self contained".

Thoughts welcome.

cc @radical @eerhardt @mitchdenny

mitchdenny commented 3 weeks ago

Would you want to move the integration aligned playgrounds as well?

davidfowl commented 3 weeks ago

We could yea.

los93sol commented 3 weeks ago

I'm looking at this and currently have a file structure like....

integrations -AWS --Aspire.Hosting.AWS ---src ---tests --playground ---AWS (I just kept the names of the playground directories here instead of flattening so there is room to add additional playgrounds per integration by default)

So far this structure seems to scale well to all of the integrations, and puts each integration's code into nice self-contained packages.

What about in the solution though? Should it mirror this exactly or is it better to go with a structure there like...

Integrations -AWS --src ---Aspire.Hosting.AWS --tests ---Aspire.Hosting.AWS.Tests --playgound ---AWS

Or this?

Integrations -AWS --Aspire.Hosting.AWS --Aspire.Hosting.AWS.Tests --playgound ---AWS

I have everything moved around locally at this point and need to start reworking the solution file and paths in csproj files.

los93sol commented 3 weeks ago

@davidfowl I started working on this in a branch. Take a look and let me know if this is heading in the right direction. There's still a lot of work to do on it, but I think it's far enough along to get a better sense of all everything we want to shift/better align.

los93sol commented 3 weeks ago

Since this touches so many files would the preference be to do a PR per integration or just shove it all through in one shot?