修复问题三则:传递构建以添加拦截器命名空间 + 支持拦截隐式推断的命令处理器 + 提示需要默认命令处理器#67
Merged
Conversation
There was a problem hiding this comment.
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/tobuildTransitive/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
approved these changes
Jan 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#65
#66