The rmcp lib test target does not build without the macros feature
メンテナーはふだん 3 日以内に返信
評価
この issue はまだ評価されていません。
説明
object! is #[macro_export]ed and documented from model.rs:42, but model.rs:60 puts it behind the macros feature, so it is unreachable in a --no-default-features build. The lib test target is where that shows on 8f9a28e: four unit tests call the macro.
$ cd /tmp/rmcp-main && cargo check -p rmcp --lib --no-default-features --profile test
# rustc 1.96.1 (31fca3adb 2026-06-26), the pinned rust-toolchain.toml, on 8f9a28e
error: cannot find macro `object` in this scope
--> crates/rmcp/src/model.rs:5529:17
note: `object` is imported here, but it is a function, not a macro
--> crates/rmcp/src/model.rs:4837:9
error: could not compile `rmcp` (lib test) due to 4 previous errors # :5459 :5488 :5503 :5529
$ cargo check -p rmcp --lib --no-default-features --features macros --profile test
Finished `test` profile [unoptimized + debuginfo] target(s) in 7.63s
# same export, `#[cfg(feature = "macros")]` deleted from model.rs:60, nothing else touched
$ cargo test -p rmcp --lib --no-default-features
test result: ok. 139 passed; 0 failed; 0 ignored
# not run: the integration targets under crates/rmcp/tests, and any host other than Linux
The expansion is serde_json::json! around the ungated model::object function, serde_json is a plain dependency, and macros is dep:rmcp-macros + dep:pastey. Deleting the gate is the one-line option. Keeping it means object(json!({ ... })) at the four call sites, or a #[cfg(feature = "macros")] on the four #[test] functions.
Dropping --lib fails too, in 13 integration targets, on missing server/client items. Different cause, and none of the above fixes it.
@DaleSeo, the feature-matrix job on feat/rationalize-feature-flags (#1067) runs cargo check, which never builds a test target, and ci.yml:268 and :302 both enable macros. Would --profile test on that job, or a cargo test -p rmcp --lib --no-default-features line beside it, be the right home for this?
- 主要言語
- Rust
- スター
- 4k
- フォーク
- 654
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 40
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/rust-sdk のほかの issue
-
P3 question T-documentation T-enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
modelcontextprotocol/rust-sdk#1155 ·
メンテナーはふだん 3 日以内に返信
-
bug P1 ready for work T-transport
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
modelcontextprotocol/rust-sdk#1325 ·
メンテナーはふだん 3 日以内に返信
-
streamable-http server: client responses to server-initiated requests (sampling/elicitation/roots) are 202-accepted and silently discarded under the 2026-07-28 protocol — the pending request hangs forever対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug P1 ready for work T-transport
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
modelcontextprotocol/rust-sdk#1321 ·
メンテナーはふだん 3 日以内に返信
-
Bound pre-lifecycle bootstrap attempts in server initialization対応中かも @DaleSeo が 3 日前に担当しました。 オープンenhancement P2 T-service T-transport
modelcontextprotocol/rust-sdk#1315 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
ProgressDispatcher: a slow progress subscriber blocks subscribe() and delivery for other tokensオープンbug P1 ready for work T-handler
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
modelcontextprotocol/rust-sdk#1312 ·
メンテナーはふだん 3 日以内に返信
modelcontextprotocol/rust-sdk の issue をすべて見る
似ている issue
-
feature request good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
TabularisDB/tabularis#853 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
andrewdavidmackenzie/jonesy#267 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 4 日以内に返信
-
`future_into_py` loses the original panic message対応中かも @Danipulok が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
PyO3/pyo3-async-runtimes#91 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信