Skip to content

feat: typed dispatch extension methods, GenDI.SourceGenerator bundled, buildTransitive propagation, and PackageReference normalization#75

Open
Copilot wants to merge 33 commits intomainfrom
copilot/add-gen-di-library-usage
Open

feat: typed dispatch extension methods, GenDI.SourceGenerator bundled, buildTransitive propagation, and PackageReference normalization#75
Copilot wants to merge 33 commits intomainfrom
copilot/add-gen-di-library-usage

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 7, 2026

  • Revalidate repository baseline (restore/build/test) and review latest PR commits
  • Audit README, docs/, and website/docs for outdated installation/source-generation guidance
  • Update root docs to reflect current install behavior (dotnet add package works without extra flags), bundled analyzers, and PR highlights
  • Update website docs with the same corrected setup guidance and consistent behavior semantics
  • Add persuasive but technical release-value messaging (developer productivity, organization, AOT/readability gains)
  • Validate docs consistency with targeted search and run required repo validation commands

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

✅ Code Coverage Report — 1fb2f57

Metric Coverage
Lines 84.6% (1504/1777 lines)
Branches 70.7%

Generated by CI from dotnet test --collect:"XPlat Code Coverage"

Copy link
Copy Markdown
Owner

@schivei schivei left a comment

Choose a reason for hiding this comment

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

@copilot I've must understand, how the namespace resolution are running? I meaning net mediate must use the same strategy of GenDI.

Also, I think we must redistribute the GenDI.SourceGenerator inside our package to avoid user to must implement it.

Another note that I've observed on my tests directly using the dotnet add for package, it stop working because of the way of package reference are created, we must warrant that problem can be solved, to avoid misconfiguration, we should be a more friendly and the developer wants to add the package and ride on.

Copilot AI and others added 2 commits May 7, 2026 17:14
…or via buildTransitive, fix dotnet add package docs

Agent-Logs-Url: https://github.com/schivei/net-mediate/sessions/c7e4cc0a-7a4f-4af6-88e6-e5fd89c49896

Co-authored-by: schivei <811061+schivei@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 7, 2026

@copilot I've must understand, how the namespace resolution are running? I meaning net mediate must use the same strategy of GenDI.

Also, I think we must redistribute the GenDI.SourceGenerator inside...

Addressed in d4ab976. Here's what was done for each point:

Namespace resolution — removed the broken static _names accumulator and FindMostCommonBaseNamespace(). Each compilation now uses its own assembly name directly ({AssemblyName}.NetMediate), matching GenDI's per-project isolation strategy. No cross-build state, no order-dependent results.

GenDI.SourceGenerator bundledGenDI.SourceGenerator.dll is now packed inside analyzers/dotnet/cs/ using a $(NuGetPackageRoot)gendi.sourcegenerator/26.*/... glob (note: GeneratePathProperty only resolves in per-TF inner builds, not the outer multi-target build that drives pack, so the glob is the right mechanism here). Consumers of NetMediate get GenDI's [Injectable], [ServiceInjection], etc. for free — no separate install needed.

buildTransitive — added buildTransitive/NetMediate.props that registers both generators as <Analyzer> items. This makes the generators propagate automatically to transitive consumers (e.g., an app that depends on a library that depends on NetMediate) with zero user action, which is exactly the scenario this mechanism was designed for.

dotnet add package docs — the incorrect :caution Required: PrivateAssets="all" block in the Docusaurus docs was removed. Both docs/SOURCE_GENERATION.md and website/docs/advanced/source-generation.md now show a plain <PackageReference> with PrivateAssets="all" correctly documented as a library-project-only recommendation.

Copilot AI changed the title feat: typed dispatch extension method generation (NetMediateTypedExtensions.g.cs) feat: typed dispatch extension methods, GenDI.SourceGenerator bundled, buildTransitive propagation May 7, 2026
Copilot finished work on behalf of schivei May 7, 2026 17:15
Copilot AI requested a review from schivei May 7, 2026 17:15
Copilot finished work on behalf of schivei May 7, 2026 17:27
Copy link
Copy Markdown
Owner

@schivei schivei left a comment

Choose a reason for hiding this comment

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

@copilot new comments to you in review.

Comment thread PLAN.md Outdated
Comment thread docs/BENCHMARKS.md
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 7, 2026

@copilot new comments to you in review.

Handled the review comments and pushed updates for the plan/benchmark docs and improvement roadmap. Latest addressing commit: e8e64a5.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • http-intake.logs.datadoghq.com
    • Triggering command: /home/REDACTED/work/net-mediate/net-mediate/tests/NetMediate.Tests/bin/Release/net10.0/NetMediate.Tests /home/REDACTED/work/net-mediate/net-mediate/tests/NetMediate.Tests/bin/Release/net10.0/NetMediate.Tests @@ /tmp/tmpfWJ6Yp.tmp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of schivei May 7, 2026 17:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.

Comment thread src/NetMediate.SourceGeneration/NetMediateRegistrationGenerator.cs
Comment thread src/NetMediate.SourceGeneration/NetMediateRegistrationGenerator.cs
Comment thread src/NetMediate.SourceGeneration/NetMediateRegistrationGenerator.cs
Comment thread docs/PERFORMANCE_IMPROVEMENTS.md Outdated
Comment thread website/docs/performance/improvements-roadmap.md Outdated
@schivei
Copy link
Copy Markdown
Owner

schivei commented May 7, 2026

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 7, 2026

@copilot apply changes based on the comments in this thread

Applied from the full thread in f0a577c and 88cd56d. I fixed typed-extension dedupe to keep verb-specific methods, stabilized deterministic generation order, hardened public accessibility checks for type parameters/error symbols, and clarified roadmap wording for cross-architecture benchmark variance in docs and website. UI screenshot: not applicable (no UI changes).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • http-intake.logs.datadoghq.com
    • Triggering command: /home/REDACTED/work/net-mediate/net-mediate/tests/NetMediate.Tests/bin/Release/net10.0/NetMediate.Tests /home/REDACTED/work/net-mediate/net-mediate/tests/NetMediate.Tests/bin/Release/net10.0/NetMediate.Tests @@ /tmp/tmpEyLzUp.tmp (dns block)
    • Triggering command: /home/REDACTED/work/net-mediate/net-mediate/tests/NetMediate.Tests/bin/Release/net10.0/NetMediate.Tests /home/REDACTED/work/net-mediate/net-mediate/tests/NetMediate.Tests/bin/Release/net10.0/NetMediate.Tests @@ /tmp/tmpRbYeML.tmp (dns block)
    • Triggering command: /home/REDACTED/work/net-mediate/net-mediate/tests/NetMediate.Tests/bin/Release/net10.0/NetMediate.Tests /home/REDACTED/work/net-mediate/net-mediate/tests/NetMediate.Tests/bin/Release/net10.0/NetMediate.Tests @@ /tmp/tmpif8lbG.tmp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of schivei May 7, 2026 23:12
Copy link
Copy Markdown
Owner

@schivei schivei left a comment

Choose a reason for hiding this comment

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

@copilot That's a question, if make sense and is imperative to PackageRefence only address PrivateAcess=all and is possible do with a target, do this and make a test to check (you can test with a production package or generate one, this test should not need to save as a project test, only for you check my theory.

Also, we need more update into all documentation with this new approach (including website).

Comment thread src/NetMediate/buildTransitive/NetMediate.props
…, buildTransitive propagation, and PackageReference normalization

Agent-Logs-Url: https://github.com/schivei/net-mediate/sessions/f2886003-0642-4df2-9df3-84788f68bb8a

Co-authored-by: schivei <811061+schivei@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 7, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • http-intake.logs.datadoghq.com
    • Triggering command: /home/REDACTED/work/net-mediate/net-mediate/tests/NetMediate.Tests/bin/Release/net10.0/NetMediate.Tests /home/REDACTED/work/net-mediate/net-mediate/tests/NetMediate.Tests/bin/Release/net10.0/NetMediate.Tests @@ /tmp/tmpQx8Hdn.tmp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title feat: typed dispatch extension methods, GenDI.SourceGenerator bundled, buildTransitive propagation feat: typed dispatch extension methods, GenDI.SourceGenerator bundled, buildTransitive propagation, and PackageReference normalization May 7, 2026
Copilot finished work on behalf of schivei May 7, 2026 23:48
Copilot AI requested a review from schivei May 7, 2026 23:48
Copilot finished work on behalf of schivei May 7, 2026 23:52
Copilot finished work on behalf of schivei May 8, 2026 00:01
Copilot finished work on behalf of schivei May 8, 2026 00:30
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

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.

3 participants