Skip to content

Conversation

@walterlv
Copy link
Member

@walterlv walterlv commented Jan 12, 2026

Copy link

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

This PR fixes three issues related to command line parsing: enables interceptor namespace propagation through transitive builds, adds support for intercepting implicitly inferred command handlers, and improves error messages to prompt for default command handlers.

Changes:

  • Moved Package.props from build/ to buildTransitive/ directory to enable proper transitive dependency propagation
  • Enhanced InterceptorModelProvider to support both explicit generic parameters and implicit type inference in method calls
  • Improved error message to specifically mention the need for a default command handler

Reviewed changes

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

Show a summary per file
File Description
src/DotNetCampus.CommandLine/Package/buildTransitive/Package.props New file defining interceptor namespaces and compiler properties for transitive build propagation
Directory.Build.props Updated import path to reference the new buildTransitive location
src/DotNetCampus.CommandLine/DotNetCampus.CommandLine.csproj Updated package inclusion path to buildTransitive for proper NuGet packaging
src/DotNetCampus.CommandLine/CommandRunner.cs Enhanced error message to explicitly mention default command handler requirement
src/DotNetCampus.CommandLine.Analyzer/Generators/ModelProviding/InterceptorModelProvider.cs Added support for intercepting method calls with implicitly inferred type parameters alongside explicit generic syntax
tests/DotNetCampus.CommandLine.Tests/CommandMatching/AddHandlerTests.cs Added test case validating typed delegate handlers with implicit type inference

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

@lindexi lindexi merged commit fbf19e8 into main Jan 12, 2026
9 checks passed
@lindexi lindexi deleted the t/walterlv/interceptor branch January 12, 2026 02:12
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