Skip to content

docs(issues): add issue specifications for #1804 and #1805 - #1806

Merged
josecelano merged 1 commit into
torrust:developfrom
josecelano:1804-1805-add-issue-specs-machete-and-workspace-coupling
May 20, 2026
Merged

josecelano merged 1 commit into
torrust:developfrom
josecelano:1804-1805-add-issue-specs-machete-and-workspace-coupling

Conversation

@josecelano

Copy link
Copy Markdown
Member

Summary

Spec-only PR. Adds issue specifications for two related dev-tools improvement issues.

#1804 — Use cargo machete --with-metadata and remove unused dev dependencies

Switches the pre-commit hook and CI from plain cargo machete to cargo machete --with-metadata,
which correctly detects ~15 unused dev dependencies across the workspace that the text-only scan
misses. Removes all flagged deps after confirming each is genuinely unused.

Spec: docs/issues/open/1804-use-cargo-machete-with-metadata-and-remove-unused-dev-deps.md

#1805 — Overhaul workspace-coupling report tool

Replaces the regex-based import scanner in contrib/dev-tools/analysis/workspace-coupling/
with a syn-based AST parser to correctly extract all use statement forms (brace groups,
glob imports, pub use re-exports). Also brings the tool's CLI output into compliance with
the global CLI output contract (ADR 20260519000000_define_global_cli_output_contract) by
replacing plain-text eprintln! calls with JSON NDJSON records. Adds unit and integration
tests following TDD order.

Spec: docs/issues/open/1805-fix-workspace-coupling-report-for-brace-and-reexport-imports.md


Related to #1804
Related to #1805
Related to #1669

Copilot AI review requested due to automatic review settings May 20, 2026 11:51
@josecelano josecelano self-assigned this May 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This spec-only PR adds two new issue specification documents to formalize planned dev-tools improvements: switching to cargo machete --with-metadata for more accurate unused-dependency detection, and rewriting the workspace-coupling report tool to use syn + comply with the global CLI output contract.

Changes:

  • Add issue spec for #1804 to adopt cargo machete --with-metadata and remove unused dev dependencies.
  • Add issue spec for #1805 to replace the workspace-coupling regex scanner with syn, add tests, and emit NDJSON JSON records on stderr per ADR.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/issues/open/1804-use-cargo-machete-with-metadata-and-remove-unused-dev-deps.md New spec defining scope, plan, and verification for migrating machete usage and removing unused dev deps.
docs/issues/open/1805-fix-workspace-coupling-report-for-brace-and-reexport-imports.md New spec defining scope, plan, and verification for a syn-based import scanner + ADR-aligned CLI output and tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



torrust#1804: Use cargo machete --with-metadata and remove unused dev dependencies
torrust#1805: Overhaul workspace-coupling report tool: replace regex scanner with syn
       and adopt CLI output contract

Both issues are related: torrust#1804 removes unused deps that were missed by plain
cargo machete, while torrust#1805 fixes the coupling report scanner that confirmed
which deps had zero references.
@josecelano
josecelano force-pushed the 1804-1805-add-issue-specs-machete-and-workspace-coupling branch from 7b788bd to a808d83 Compare May 20, 2026 11:58
@josecelano

Copy link
Copy Markdown
Member Author

ACK a808d83

@josecelano
josecelano merged commit 0d7e6f4 into torrust:develop May 20, 2026
1 check passed
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.

2 participants