From be7d51adc866e278c969026ed18f09df638264d7 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 16 Apr 2026 07:36:37 +0000 Subject: [PATCH 1/2] chore: add cargo-autoinherit to init, fmt, and CI Install cargo-autoinherit in `just init`, run it as the first step in `just fmt` to move shared dependencies to workspace inheritance, and verify no un-inherited dependencies slip through in the CI fmt job. https://claude.ai/code/session_01PCwRbvAEXdAD7ieDyKe7pb --- .github/workflows/ci.yml | 3 ++- justfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd7c266a..a691d598 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -210,11 +210,12 @@ jobs: with: save-cache: ${{ github.ref_name == 'main' }} cache-key: fmt - tools: cargo-shear@1.11.1 + tools: cargo-shear@1.11.1,cargo-autoinherit components: clippy rust-docs rustfmt - uses: oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4 - run: pnpm oxfmt --check + - run: cargo autoinherit && git diff --exit-code - run: cargo shear --deny-warnings - run: cargo fmt --check - run: RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --document-private-items diff --git a/justfile b/justfile index 48f8708b..69a54724 100644 --- a/justfile +++ b/justfile @@ -9,7 +9,7 @@ _default: alias r := ready init: - cargo binstall watchexec-cli cargo-insta typos-cli cargo-shear@1.11.1 taplo-cli -y + cargo binstall watchexec-cli cargo-insta typos-cli cargo-shear@1.11.1 cargo-autoinherit taplo-cli -y ready: git diff --exit-code --quiet @@ -24,6 +24,7 @@ watch *args='': watchexec --no-vcs-ignore {{args}} fmt: + cargo autoinherit cargo shear --fix cargo fmt --all pnpm oxfmt From 4a1060ca08a904f9a516afebd8e6e5530096610d Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 16 Apr 2026 07:42:41 +0000 Subject: [PATCH 2/2] chore: run cargo-autoinherit and pin version in CI Move `ntest`, `terminal_size` to `[workspace.dependencies]` and switch `vite_str` in vite_select from a path dep to workspace inheritance. Pin cargo-autoinherit to v0.1.6 in CI. https://claude.ai/code/session_01PCwRbvAEXdAD7ieDyKe7pb --- .github/workflows/ci.yml | 2 +- Cargo.toml | 2 ++ crates/pty_terminal/Cargo.toml | 4 ++-- crates/pty_terminal_test/Cargo.toml | 2 +- crates/vite_select/Cargo.toml | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a691d598..53705ab6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -210,7 +210,7 @@ jobs: with: save-cache: ${{ github.ref_name == 'main' }} cache-key: fmt - tools: cargo-shear@1.11.1,cargo-autoinherit + tools: cargo-shear@1.11.1,cargo-autoinherit@0.1.6 components: clippy rust-docs rustfmt - uses: oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4 diff --git a/Cargo.toml b/Cargo.toml index a39f596d..411e5cfc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -154,6 +154,8 @@ widestring = "1.2.0" winapi = "0.3.9" winsafe = { version = "0.0.24", features = ["kernel"] } xxhash-rust = { version = "0.8.15", features = ["const_xxh3"] } +ntest = "0.9.5" +terminal_size = "0.4" [workspace.metadata.cargo-shear] ignored = [ diff --git a/crates/pty_terminal/Cargo.toml b/crates/pty_terminal/Cargo.toml index 52c800e2..67cd3f94 100644 --- a/crates/pty_terminal/Cargo.toml +++ b/crates/pty_terminal/Cargo.toml @@ -15,9 +15,9 @@ vt100 = { workspace = true } [dev-dependencies] ctor = { workspace = true } ctrlc = { workspace = true } -ntest = "0.9.5" +ntest = { workspace = true } subprocess_test = { workspace = true, features = ["portable-pty"] } -terminal_size = "0.4" +terminal_size = { workspace = true } [target.'cfg(unix)'.dev-dependencies] nix = { workspace = true } diff --git a/crates/pty_terminal_test/Cargo.toml b/crates/pty_terminal_test/Cargo.toml index a830d4b8..e47ca1ff 100644 --- a/crates/pty_terminal_test/Cargo.toml +++ b/crates/pty_terminal_test/Cargo.toml @@ -16,7 +16,7 @@ pty_terminal_test_client = { workspace = true } [dev-dependencies] crossterm = { workspace = true } ctor = { workspace = true } -ntest = "0.9.5" +ntest = { workspace = true } pty_terminal_test_client = { workspace = true, features = ["testing"] } subprocess_test = { workspace = true, features = ["portable-pty"] } diff --git a/crates/vite_select/Cargo.toml b/crates/vite_select/Cargo.toml index a86bee51..dc6467a1 100644 --- a/crates/vite_select/Cargo.toml +++ b/crates/vite_select/Cargo.toml @@ -14,7 +14,7 @@ workspace = true anyhow = { workspace = true } crossterm = { workspace = true } nucleo-matcher = { workspace = true } -vite_str = { path = "../vite_str" } +vite_str = { workspace = true } [dev-dependencies] assert2 = { workspace = true }