[Deps] Put clap behind an optional cli feature - #25
Merged
Conversation
kageiit
enabled auto-merge (squash)
August 26, 2026 22:43
nimakarimipour
approved these changes
Aug 26, 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.
clapsits in[dependencies]but onlybin/server.rsandbin/client.rsuse it - nothing undersrc/mentions it. Every library consumer ofmcp_rshas therefore been compiling clap and its subtree for nothing. This makes it optional behind a non-defaultclifeature and gates the two binaries on it.required-featuresmeans cargo skips a binary rather than failing when the feature is off, socargo buildon a checkout still succeeds, and both CI jobs already pass--all-features, so the binaries stay built and linted.Measured on this branch:
cargo tree -e normalgoes from 13 clap-subtree crates to zero, andcargo tree -e normal --features clistill shows them.In gitar this subtree reaches most of the workspace, since
mcp_rsis a dependency ofagent-models. We just moved every gitar CLI from clap tousage, and this was the one remaining edge keeping clap in the graph.Heads up on two things I did not touch:
CI is already red on main.
cargo test --all-featuresfails with 15E0061s intests/tools.rs, fromagent_id: Uuidlanding onCallToolArgsas a requiredTypedBuilderfield without the test call sites being updated. I reproduced that onmainat9b4756fwith this branch stashed, so it predates this PR.Left alone, as the fix is a semantic call: either the tests supply an
agent_idor the field takes a#[builder(default)], and whoever wrote it knows which.gitar is pinned to a commit that is not on any branch. Our
rev = "43eb26e6"is the pre-squash head of #19, reachable only throughrefs/pull/19/head. #19 squash-merged asb496f16, and main has three commits since.So consuming this means moving off that dangling head onto main, which also brings
e6409b7(syncget_tool) and9b4756f. Separate bump on our side, not something this PR does.