Uh oh!
There was an error while loading. Please reload this page.
refactor: fix error introduced by merge, reorganize features - #185
Conversation
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.
| #[cfg(feature = "__reqwest")] | |
| #[cfg(feature = "reqwest")] |
There was a problem hiding this comment.
It would be bad looking to see an internal feature "__reqwest" in the document.
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