The rmcp lib test target does not build without the macros feature
Maintainer antworten meist innerhalb von 2 Tagen
@DaleSeo arbeitet bereits daran.
Seit 04.10.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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?
- Vorherrschende Sprache
- Rust
- Sterne
- 4.1k
- Forks
- 680
- Ø Merge
- 3 T. 14 Std.
- Gemergte PRs (30 T.)
- 39
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus modelcontextprotocol/rust-sdk
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopeEvtl. vergeben @jstar0 hat das vor 24 Tagen übernommen. Offenbug P1 ready for work T-security T-transport
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
modelcontextprotocol/rust-sdk#1330 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
OAuth discovery drops explicit default ports from advertised issuer identifiersEvtl. vergeben @gocamille hat das vor 1 Tag übernommen. Offenbug P1 ready for work T-security T-transport
modelcontextprotocol/rust-sdk#1420 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
-
`register_client` drops `client_secret_expires_at` from the registration responseEvtl. vergeben @gocamille hat das vor 2 Tagen übernommen. Offenbug P2 ready for work T-security
modelcontextprotocol/rust-sdk#1416 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Typed client calls drop the parse error when a reply misses a required fieldEvtl. vergeben @gocamille hat das vor 2 Tagen übernommen. Offenenhancement P2 ready for work T-core T-service
modelcontextprotocol/rust-sdk#1415 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Return merged cache hints from list_all_* client methodsEvtl. vergeben @gocamille hat das vor 3 Tagen übernommen. Offenenhancement P2 ready for work T-service
modelcontextprotocol/rust-sdk#1411 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in modelcontextprotocol/rust-sdk
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
libnativeapi/nativeapi#21 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
longbridge/nsh#804 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag