From 5d2d3002ef52cbb63aafc00f0c8883f160b80633 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Thu, 28 Aug 2025 21:43:40 -0700 Subject: [PATCH] fix: specify --profile to `cargo clippy` in CI (#2871) Today we had a breakage in the release build that went unnoticed by CI. Here is what happened: - https://github.com/openai/codex/pull/2242 originally added some logic to do release builds to prevent this from happening - https://github.com/openai/codex/pull/2276 undid that change to try to speed things up by removing the step to build all the individual crates in release mode, assuming the `cargo check` call was sufficient coverage, which it would have been, had it specified `--profile` This PR adds `--profile` to the `cargo check` step so we should get the desired coverage from our build matrix. Indeed, enabling this in our CI uncovered a warning that is only present in release mode that was going unnoticed. --- .github/workflows/rust-ci.yml | 2 +- codex-rs/tui/src/lib.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index fa9f1cd1..7d02c95d 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -134,7 +134,7 @@ jobs: - name: cargo clippy id: clippy - run: cargo clippy --target ${{ matrix.target }} --all-features --tests -- -D warnings + run: cargo clippy --target ${{ matrix.target }} --all-features --tests --profile ${{ matrix.profile }} -- -D warnings # Running `cargo build` from the workspace root builds the workspace using # the union of all features from third-party crates. This can mask errors diff --git a/codex-rs/tui/src/lib.rs b/codex-rs/tui/src/lib.rs index 4154160d..544aec27 100644 --- a/codex-rs/tui/src/lib.rs +++ b/codex-rs/tui/src/lib.rs @@ -64,8 +64,6 @@ mod chatwidget_stream_tests; #[cfg(not(debug_assertions))] mod updates; -#[cfg(not(debug_assertions))] -use color_eyre::owo_colors::OwoColorize; pub use cli::Cli;