8000 fix: build release without the test-only import by aorumbayev · Pull Request #148 · kagan-sh/kagan · GitHub
[go: up one dir, main page]

Skip to content

fix: build release without the test-only import - #148

Merged
aorumbayev merged 1 commit into
mainfrom
fix/release-unused-import
Nov 12, 2026
Merged

aorumbayev merged 1 commit into
mainfrom
fix/release-unused-import

Conversation

@aorumbayev
Copy link
Copy Markdown
Member

Cause

The `OsString` import in `crates/core/src/usage/claude.rs` was used only by the `#[cfg(any(test, feature = "test"))]` variant `Search::Path`. A non-test build warned "unused import".

CI linted only with `--all-targets`, which turns the test cfg on, so the warning never reached a job.

Change

  • The variant names `std::ffi::OsString` itself, and the top-level import is gone.
  • Linux clippy also lints the product without `--all-targets`: `cargo clippy --workspace --locked -- -D warnings`.

Proof

  • With the old file restored, the new clippy step fails with `unused import: std::ffi::OsString`.
  • With the fix, the product clippy, the `--all-targets` clippy, `cargo fmt --check`, and `cargo t -p kg-core usage` (35 passed) all pass locally.

The `OsString` import in crates/core/src/usage/claude.rs was used only by
the `#[cfg(any(test, feature = "test"))]` variant, so a release build
warned "unused import". The variant now names `std::ffi::OsString` itself.

CI linted only with `--all-targets`, which turns the test cfg on, so the
warning never reached a job. Linux clippy now also lints the product
without `--all-targets`.
@aorumbayev
aorumbayev merged commit 4f80bf5 into main Nov 12, 2026
20 checks passed
@aorumbayev
aorumbayev deleted the fix/release-unused-import branch November 12, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0