Skip to content

Conversation

@Itzalive
Copy link
Contributor

@Itzalive Itzalive commented Dec 10, 2025

Resolve an issue where generic arguments in method calls are not considered dependencies.

The helps validate modular architecture, especially for dealing with ioc containers where the types are all generic arguments.
e.g.
services.AddTransient<IMyService, MyService>();
serviceProvider.Resolve<IMyService>()

@Itzalive Itzalive force-pushed the feature/generic-argument-types-are-dependencies branch from cd58b9c to af12f16 Compare December 10, 2025 21:26
@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.79%. Comparing base (cb83e98) to head (bedca60).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #437   +/-   ##
=======================================
  Coverage   73.79%   73.79%           
=======================================
  Files         259      259           
  Lines       16387    16387           
  Branches     1336     1336           
=======================================
  Hits        12092    12092           
  Misses       3878     3878           
  Partials      417      417           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Itzalive Itzalive force-pushed the feature/generic-argument-types-are-dependencies branch from af12f16 to b6e8984 Compare December 10, 2025 21:30
Signed-off-by: Pete Forrest <petemforrest@gmail.com>
@Itzalive Itzalive force-pushed the feature/generic-argument-types-are-dependencies branch from b6e8984 to da5d0d6 Compare December 10, 2025 21:31
@Itzalive
Copy link
Contributor Author

Not sure if this is the best implementation approach of this, having not contributed to this project before. Welcome any feedback.

@richardthombsensek
Copy link

👍 We've just started to trial ArchUnitNET and one of our initial speedbumps was that generic arguments were not picked up as dependencies.

Signed-off-by: Pete Forrest <petemforrest@gmail.com>
@Itzalive Itzalive force-pushed the feature/generic-argument-types-are-dependencies branch 2 times, most recently from 0f7133a to a942f6a Compare December 11, 2025 09:56
Signed-off-by: Pete Forrest <petemforrest@gmail.com>
@Itzalive Itzalive force-pushed the feature/generic-argument-types-are-dependencies branch from a942f6a to ed98f4e Compare December 11, 2025 11:01
Copy link
Collaborator

@alexanderlinne alexanderlinne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking the time to propose a fix for this @Itzalive. I've left a few comments, happy to discuss if you don't agree with something.

Signed-off-by: Pete Forrest <petemforrest@gmail.com>
@Itzalive Itzalive force-pushed the feature/generic-argument-types-are-dependencies branch 4 times, most recently from 5037e30 to b8538f9 Compare December 15, 2025 11:31
Signed-off-by: Pete Forrest <petemforrest@gmail.com>
@Itzalive Itzalive force-pushed the feature/generic-argument-types-are-dependencies branch from b8538f9 to ce1fb2e Compare December 15, 2025 11:37
Signed-off-by: Pete Forrest <petemforrest@gmail.com>
@Itzalive
Copy link
Contributor Author

Thanks for the feedback - it's a much smaller change now and more the size it should be. And I figured out csharpier to stop all those force pushes 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants