Skip to content

Remove dead code, identity functions, and duplicated URL builders#263

Merged
arncore merged 1 commit intomainfrom
refactor/remove-dead-code-deduplicate-urls
Apr 3, 2026
Merged

Remove dead code, identity functions, and duplicated URL builders#263
arncore merged 1 commit intomainfrom
refactor/remove-dead-code-deduplicate-urls

Conversation

@arncore
Copy link
Copy Markdown
Owner

@arncore arncore commented Apr 3, 2026

Summary

  • Removed process.rsrun_command/CommandOutput never imported outside module; all callers use std::process::Command directly (-77 lines)
  • Removed derive_dep_name() — Identity function that just returned its input unchanged
  • Removed split_maven_coordinate wrapper in update.rs — one-line delegation to common::split_maven_coordinate
  • cache_path delegates to repository_path — Eliminated duplicated group/artifact/version path computation
  • maven_artifact_url() helper — Shared by pom_url and module_metadata_url, replacing duplicated URL pattern

6 files changed, +15 -134 (net -119 lines)

Test plan

  • cargo test --workspace — 753/753 tests pass (7 fewer = removed dead code tests)
  • cargo clippy --workspace -- -D warnings — 0 warnings
  • cargo fmt --all -- --check — clean
  • CI passes

🤖 Generated with Claude Code

- Remove `konvoy-util/src/process.rs` — `run_command` and `CommandOutput`
  are never imported outside their own module; all callers use
  `std::process::Command` directly (-77 lines)
- Remove `derive_dep_name()` identity function in update.rs — just
  returned its input; inline `.clone()` at the call site
- Remove `split_maven_coordinate` wrapper in update.rs — dead
  indirection to `common::split_maven_coordinate`
- Simplify `MavenCoordinate::cache_path` to delegate to `repository_path`
  instead of recomputing the same group/artifact/version path
- Extract `maven_artifact_url()` in maven.rs — shared by `pom_url`
  and `module_metadata_url`, eliminating duplicated URL pattern

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/konvoy-engine/src/update.rs 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@arncore arncore merged commit 480b2ce into main Apr 3, 2026
18 checks passed
@arncore arncore deleted the refactor/remove-dead-code-deduplicate-urls branch April 3, 2026 14:40
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