From 5d2c7bd37285dade16068dfa9fc8d02f3c6800ee Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Tue, 6 May 2025 11:43:20 -0700 Subject: [PATCH] fix: ensure mcp-client crate builds on its own --- .github/workflows/rust-ci.yml | 9 +++++++++ codex-rs/mcp-client/Cargo.toml | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 25394d6a57..7eaf5a4d85 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -83,6 +83,15 @@ jobs: - name: cargo clippy run: cargo clippy --target ${{ matrix.target }} --all-features -- -D warnings || echo "FAILED=${FAILED:+$FAILED, }cargo clippy" >> $GITHUB_ENV + # Running `cargo build` from the workspace root builds the workspace using + # the union of all features from third-party deps. This can mask errors + # where individual crates have underspecified features. To avoid this, we + # run `cargo build` from each crate individually, though because this is + # slower, we only do this for the x86_64-unknown-linux-gnu target. + - name: cargo build individual crates + if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} + run: find . -name Cargo.toml -mindepth 2 -maxdepth 2 -execdir cargo build \; || echo "FAILED=${FAILED:+$FAILED, }cargo build individual crates" >> $GITHUB_ENV + - name: cargo test run: cargo test --target ${{ matrix.target }} || echo "FAILED=${FAILED:+$FAILED, }cargo test" >> $GITHUB_ENV diff --git a/codex-rs/mcp-client/Cargo.toml b/codex-rs/mcp-client/Cargo.toml index b3792922cc..562675c845 100644 --- a/codex-rs/mcp-client/Cargo.toml +++ b/codex-rs/mcp-client/Cargo.toml @@ -11,11 +11,11 @@ serde_json = "1" tracing = { version = "0.1.41", features = ["log"] } tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] } tokio = { version = "1", features = [ - "io-std", + "io-util", "macros", "process", "rt-multi-thread", - "signal", + "sync", ] } [dev-dependencies]