Skip to content

feat(rules): workspace-dependencies declares each dependency once, for the workspace - #46

Draft
PiquelChips wants to merge 1 commit into
feat/rule-required-lintsfrom
feat/rule-workspace-dependencies
Draft

PiquelChips wants to merge 1 commit into
feat/rule-required-lintsfrom
feat/rule-workspace-dependencies

Conversation

@PiquelChips

@PiquelChips PiquelChips commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Stacked on #45; part of a stack adding the standard's rules over manifests, config files, workflows, recipes and docs. Rebased onto #13's head c4a57df.

What and why

DP1: dependencies are declared once in [workspace.dependencies] and inherited, so versions can't drift between crates.

  • Every dependency of a workspace crate, of every kind (normal, dev, build) and target, has workspace = true.
  • Every path entry of [workspace.dependencies] has a version.
  • No fix: moving a declaration may mean choosing between versions.

Measured

piqueld sourceorigin DirkEngine
Violations 2 1 0

Measured read-only at origin/main: piqueld a17710f52, sourceorigin e99cc0e6b, DirkEngine 07e8ba44.

  • piqueld: piqueld dev-depends on itself directly, and piqueld-generated has no version.
  • sourceorigin: auth-service's dev-dependency webauthn-authenticator-rs.

Same as the inventory.

Testing

  • New fixture test: an unversioned path entry, a dev-dependency and a target dependency declared in the crate; inherited ones, with features, pass.
  • At this commit: Clippy with -D warnings, cargo nextest run --workspace and cargo xtask standard pass with a clean tree; just readme regenerated the rules list.
  • At the stack's tip: just check-changed origin/feat/readme-standard passes (fmt-check, audit, unused, standard, lint, doc, test, doc-test, package).

Checklist

  • The crate's README (its documentation on docs.rs) shows the change, and a repository's xtask can still follow it.
  • A change to the public API is noted for the next release, with what each repository's xtask must change. (A new rule: each repository fixes its violations (cargo xtask standard --fix where a fix exists) or adds a deviation with its reason.)
  • just check-changed passes.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

@PiquelChips
PiquelChips force-pushed the feat/rule-required-lints branch from 2d8df30 to 2b5c700 Compare November 22, 2026 22:30
@PiquelChips
PiquelChips force-pushed the feat/rule-workspace-dependencies branch from ec1c3b3 to 12ea53c Compare November 22, 2026 22:30
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