refactor: fix error introduced by merge, reorganize features#185
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors feature flags to fix a merge error, streamlines TLS/provider options, and makes reqwest an optional dependency.
- Renamed SSE transport feature (
transport-sse→transport-sse-client) and consolidated TLS flags intoreqwestandreqwest-tls-no-provider. - Updated example projects and documentation to use new feature names and bumped
reqwestto v0.12. - Adjusted internal module cfg guards (
__auth→auth,__transport-*→ new feature names).
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| examples/simple-chat-client/src/config.rs | Switched from SseTransport to SseClientTransport and updated call to start |
| examples/simple-chat-client/Cargo.toml | Bumped reqwest version; replaced git dependency with workspace = true and updated rmcp features |
| examples/rig-integration/Cargo.toml | Renamed transport-sse feature to transport-sse-client |
| examples/clients/Cargo.toml | Renamed transport-sse to transport-sse-client and added reqwest feature |
| docs/OAUTH_SUPPORT.md | Updated example to use transport-sse-client feature |
| crates/rmcp/src/transport/streamable_http_client.rs | Changed feature guard from __auth to auth |
| crates/rmcp/src/transport/sse_client.rs | Removed URL and join error variants; switched to auth guard |
| crates/rmcp/src/transport/common/reqwest.rs | Aligned feature guard to transport-streamable-http-client |
| crates/rmcp/src/transport/common/auth.rs | Aligned feature guard to transport-streamable-http-client |
| crates/rmcp/src/transport/common.rs | Changed reqwest guard to __reqwest |
| crates/rmcp/src/transport.rs | Updated multiple feature gates for SSE, auth, and streamable HTTP |
| crates/rmcp/Cargo.toml | Reorganized feature definitions and updated test feature requirements |
Comments suppressed due to low confidence (3)
crates/rmcp/src/transport/sse_client.rs:29
- The
Urlerror variant was removed, but parse errors may still occur; reintroduce or properly handle URL parsing failures to avoid unhandled errors or compilation issues.
#[error("Url error: {0}")]
examples/simple-chat-client/Cargo.toml:16
- [nitpick] Using
workspace = truehere while other examples usepathmay lead to inconsistent crate resolution; consider using a consistentpath = "../../crates/rmcp"reference for local development.
rmcp = { workspace = true, features = [
crates/rmcp/Cargo.toml:150
- [nitpick] The test
required-featuresnow includes__reqwestbut not its TLS sub-features; ensure any dependent TLS flags (e.g.,rustls-tls) are also enabled if tests exercise HTTP functionality.
"__reqwest",
| pub mod http_header; | ||
|
|
||
| #[cfg(feature = "reqwest")] | ||
| #[cfg(feature = "__reqwest")] |
There was a problem hiding this comment.
The doc(cfg(...)) annotation references feature = "reqwest" but the guard uses __reqwest, causing a mismatch in generated docs; align the documented feature name with the actual flag.
Suggested change
| #[cfg(feature = "__reqwest")] | |
| #[cfg(feature = "reqwest")] |
Contributor
Author
There was a problem hiding this comment.
It would be bad looking to see an internal feature "__reqwest" in the document.
jokemanfire
approved these changes
May 18, 2025
3 tasks
Merged
takumi-earth
pushed a commit
to earthlings-dev/rmcp
that referenced
this pull request
Jan 27, 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.
Motivation and Context
fix error introduced by merge
How Has This Been Tested?
Breaking Changes
reqwestandreqwest-tls-no-provider, otherwise there would be too many tls option features.Types of changes
Checklist
Additional context
It breaks the changes of #155.
cc @msardara