Skip to content

Move tempfile to dev-dependencies and drop clap_derive - #143

Merged
dduugg merged 1 commit into
mainfrom
move-tempfile-to-dev-dependencies
Oct 21, 2026
Merged

dduugg merged 1 commit into
mainfrom
move-tempfile-to-dev-dependencies

Conversation

@dduugg

@dduugg dduugg commented Oct 21, 2026

Copy link
Copy Markdown
Contributor
  • Moves tempfile to [dev-dependencies]. Only the unit tests in src/ and the tests in tests/ use it, but as a normal dependency it reached every crate that depends on codeowners. So did eight crates that only it pulls in: rustix, linux-raw-sys, getrandom, wasip2, wit-bindgen, errno, fastrand and r-efi.
  • This matters for the code_ownership gem, which runs cargo vendor into its source gem and so ships all nine crates' sources. Three of them, rustix, linux-raw-sys and wit-bindgen, include a LICENSE-Apache-2.0_WITH_LLVM-exception file. License scanners such as Socket flag that file even though each crate is also offered under MIT.
  • Removes clap_derive. It was a direct dependency that nothing names, and clap's derive feature already depends on it, so the only change it makes is one line in Cargo.lock.
  • The version stays at 0.5.0, so merging releases nothing.

Verification

  • With --locked, all of these pass: cargo check, cargo build --release, cargo fmt --all -- --check, cargo clippy --all-targets --all-features -- -D warnings and cargo test. The tests report 178 passed and 3 ignored.
  • I moved each remaining [dependencies] entry to [dev-dependencies] in turn and ran cargo check --lib --bins. Every other dependency is needed by the library or binary. clap_derive was the only entry that also compiled with --all-targets when removed outright.
  • With code_ownership's extension patched to this branch, cargo vendor goes from 120 crates to 111. It loses exactly the nine above and adds none. unicode-ident stays, with its Unicode-3.0 license file, because proc-macro2 needs it for derive macros.

tempfile is only used by tests, but as a normal dependency it reached
every crate that depends on codeowners, along with rustix,
linux-raw-sys, getrandom, wasip2, wit-bindgen, errno, fastrand and
r-efi. The code_ownership gem vendors that tree into its source gem, so
it shipped all nine crates. Three of them carry an Apache-2.0 WITH
LLVM-exception license file, which license scanners such as Socket flag
even though each crate is also offered under MIT.

clap_derive was a direct dependency that nothing names. clap's derive
feature already depends on it, so removing it changes only Cargo.lock's
list of codeowners' direct dependencies.
@dduugg
dduugg requested a review from a team as a code owner October 21, 2026 18:44
@github-project-automation github-project-automation Bot moved this to Triage in Modularity Oct 21, 2026
@dduugg
dduugg merged commit 8533964 into main Oct 21, 2026
15 checks passed
@dduugg
dduugg deleted the move-tempfile-to-dev-dependencies branch October 21, 2026 18:48
@github-project-automation github-project-automation Bot moved this from Triage to Done in Modularity Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant