Skip to content

Add Static Extensions (And fix a bug in cycle-detection) - #27

Merged
carl-andersson-at-westermo merged 21 commits into
mainfrom
static-extensions
Jul 24, 2026
Merged

Add Static Extensions (And fix a bug in cycle-detection)#27
carl-andersson-at-westermo merged 21 commits into
mainfrom
static-extensions

Conversation

@carl-andersson-at-westermo

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds C# 14 “static extension” based resolution generation alongside existing dictionary-based resolution, and updates cycle detection + collection/reentrancy behaviors with new tests/benchmarks.

Changes:

  • Generate C# 14 static-extension Resolve(container?) APIs (gated on parse options) and adjust generated container internals to support them.
  • Replace cycle detection logic with a DFS-based graph walk and add tests for cross-array reentrancy + base/child array merging.
  • Update benchmarks to compare dictionary vs static-extension resolution paths; bump several projects to net10.0 / LangVersion=preview.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
Tests/TestWebApp/TestWebApp.csproj Bumps test web app TFM to net10.0.
Tests/TestData/Inheritor/Types.cs Adds split-array implementations for base/child merge tests (plus an extra using).
Tests/TestData/Inheritor/Inheritor.csproj Enables LangVersion=preview for the Inheritor test-data project.
Tests/TestData/Inherited/Types.cs Adds cross-array reentrancy + split-array test types.
Tests/FactoryGenerator.Tests/InjectionDetectionTests.cs Adds tests covering cross-array reentrancy + array merging across container hierarchies.
Tests/FactoryGenerator.Extensions.AspNetCore.Tests/FactoryGenerator.Extensions.AspNetCore.Tests.csproj Bumps AspNetCore extension tests to net10.0.
FactoryGenerator/FactoryGenerator.cs Implements static-extension generation, adjusts collection naming, and rewrites cycle detection.
FactoryGenerator.Extensions.AspNetCore/FactoryGenerator.Extensions.AspNetCore.csproj Bumps extension library TFM to net10.0.
Benchmarking/Benchmarks/Program.cs Adds static-extension benchmarks and uses BenchmarkSwitcher.
Benchmarking/Benchmarks/Benchmarks.csproj Bumps benchmarks to net10.0 + LangVersion=preview.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Tests/TestWebApp/TestWebApp.csproj
Comment thread Benchmarking/Benchmarks/Benchmarks.csproj
Comment thread FactoryGenerator/FactoryGenerator.cs Outdated
Comment thread Tests/TestData/Inheritor/Types.cs Outdated
Comment thread Benchmarking/Benchmarks/Program.cs
Comment thread FactoryGenerator/FactoryGenerator.cs Outdated
@carl-andersson-at-westermo
carl-andersson-at-westermo merged commit 3c12a7a into main Jul 24, 2026
4 of 5 checks passed
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.

2 participants