BitFun icon indicating copy to clipboard operation
BitFun copied to clipboard

[BUG] services-integrations: 4 MCP deprecation warnings prevent clean clippy baseline

Open 1688mengdie opened this issue 4 months ago • 3 comments

Summary

cargo check --workspace produces 4 deprecation warnings from bitfun-services-integrations:

  1. SseStream::from_byte_stream is deprecated (typo), use from_bytes_stream (2 occurrences)
  2. ClientCapabilities::enable_roots() is deprecated by SEP-2577
  3. ClientCapabilities::enable_sampling() is deprecated by SEP-2577

These are the only warnings in the entire workspace, preventing a clean cargo clippy -- -D warnings baseline.

Root Cause

src/crates/services/services-integrations/src/mcp/protocol/:

  • transport_remote.rs lines 205, 306 — uses deprecated SseStream::from_byte_stream(). The method was a typo; upstream sse-stream renamed it to from_bytes_stream().
  • client_info.rs lines 11-12 — calls enable_roots() and enable_sampling() which are deprecated per SEP-2577 (MCP spec change). These capabilities are being removed from the MCP protocol.

Evidence

warning: use of deprecated associated function `SseStream::from_byte_stream`
warning: use of deprecated method `enable_roots`: deprecated by SEP-2577
warning: use of deprecated method `enable_sampling`: deprecated by SEP-2577

4 warnings total, all in bitfun-services-integrations.

Fix

  • from_byte_stream → from_bytes_stream (×2)
  • Removed .enable_roots() and .enable_sampling() from ClientCapabilities::builder() chain

After fix: zero warnings workspace-wide.

Fixed in

  • PR: https://github.com/GCWing/BitFun/pull/1674
  • Files: src/crates/services/services-integrations/src/mcp/protocol/transport_remote.rs, client_info.rs

1688mengdie avatar Jul 22 '26 07:07 1688mengdie

Fixed in #1693

1688mengdie avatar Jul 22 '26 20:07 1688mengdie

Closing as resolved. The deprecated API calls were addressed in PR #1885 (merged 2026-07-30):

  • transport_remote.rs: SseStream::from_byte_stream() → SseStream::from_bytes_stream() (2 occurrences)
  • client_info.rs: enable_roots() and enable_sampling() retained with #[allow(deprecated)] and a documented rationale (BitFun advertises both so servers that gate features keep working; revisit when rmcp removes the builders)

cargo clippy -p bitfun-services-integrations is now clean with zero warnings.

xielixing avatar Aug 04 '26 19:08 xielixing

The deprecation warnings described here were resolved in PR #1885 (merged 2026-07-30):

  • transport_remote.rs: SseStream::from_byte_stream() → SseStream::from_bytes_stream() (2 occurrences)
  • client_info.rs: enable_roots() and enable_sampling() retained with #[allow(deprecated)] and a documented rationale — BitFun advertises both so servers that gate features keep working; revisit when rmcp removes the builders

cargo clippy -p bitfun-services-integrations is now clean with zero warnings. This issue can be closed.

xielixing avatar Aug 04 '26 19:08 xielixing