refactor(deps): declare dependency features in member crates - #688
Merged
Conversation
fspy benchmarklinuxmacoswindows |
Features on [workspace.dependencies] entries are forced on every member that uses the dependency — members can add features but never subtract — so the workspace manifest over-featured most crates and hid which crate needs what. Every features list moves to the member crates that use it; default-features = false stays at the workspace level, the only place it takes effect. Moving them exposed rot in both directions: bumpalo/collections was workspace-wide for one import in fspy's arena, nix/dir was used only by vt's fingerprinting, nix/signal only by pty_terminal's tests, and xxhash-rust/const_xxh3 had no users at all and is gone; fspy_ipc_str used extern_crate_alloc without declaring it and only compiled because the workspace forced the feature. Every affected member was checked individually with cargo check -p --all-targets on the host plus the Linux and Windows targets, so no member relies on feature unification from a sibling. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
wan9chi
force-pushed
the
agent/deps-features-per-crate
branch
from
August 18, 2026 17:20
3cab90f to
82c867d
Compare
wan9chi
marked this pull request as ready for review
August 18, 2026 17:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Features declared on
[workspace.dependencies]entries are forced on every member that uses the dependency — a member can add features but never subtract them — so the workspace manifest quietly over-featured most crates and hid which crate actually needs what. Everyfeatures = [...]list moves from the workspace manifest to the member crates that use it;default-features = falsestays at the workspace level, where it is the only place it can take effect.Moving them exposed two kinds of rot:
bumpalo/collectionswas declared workspace-wide for one brace-grouped import in fspy's arena (now declared there);nix/dirwas used only by vt's fingerprinting;nix/signalonly by pty_terminal's tests;xxhash-rust/const_xxh3had no users at all and is gone.TransparentWrapperAlloc(extern_crate_alloc) but only compiled because the workspace forced the feature; it now declares it.Every affected member was checked individually (
cargo check -p … --all-targets) on the host plus the Linux and Windows targets, so no member relies on feature unification from a sibling.🤖 Generated with Claude Code