Skip to content

refactor(core): remove legacy traits, add Ecosystem defaults, replace async_trait#70

Merged
bug-ops merged 1 commit intomainfrom
refactor/architectural-improvements
Feb 23, 2026
Merged

refactor(core): remove legacy traits, add Ecosystem defaults, replace async_trait#70
bug-ops merged 1 commit intomainfrom
refactor/architectural-improvements

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Feb 23, 2026

Summary

  • Remove ~2000 lines of deprecated handler.rs and legacy trait system (PackageRegistry, VersionInfo, PackageMetadata, EcosystemHandler)
  • Add default method implementations to Ecosystem trait for LSP handlers, eliminating ~400 lines of identical boilerplate across 8 ecosystem crates
  • Replace async_trait proc-macro with explicit BoxFuture pattern across all async traits (14% build time improvement)
  • Centralize test mock types (MockDep, MockParseResult) in deps-core

Net result: -3500 lines, 14% faster builds, zero test regressions (1088 tests + 16 doc tests pass)

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo nextest run --workspace --lib --bins (1088 passed)
  • cargo test --workspace --doc --all-features (16 passed)

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes needs-review Needs review size: XXL >1000 lines changed labels Feb 23, 2026
… async_trait

Remove ~2000 lines of deprecated handler.rs and legacy trait system
(PackageRegistry, VersionInfo, PackageMetadata, EcosystemHandler).

Add default method implementations to Ecosystem trait for
generate_inlay_hints, generate_hover, generate_code_actions,
generate_diagnostics — eliminating ~400 lines of identical boilerplate
across 8 ecosystem crates.

Replace async_trait proc-macro with explicit BoxFuture pattern across
Ecosystem, Registry, and LockFileProvider traits and all implementations.

Centralize test mock types (MockDep, MockParseResult) in deps-core.

Closes #68
@bug-ops bug-ops force-pushed the refactor/architectural-improvements branch from faaf345 to a02f113 Compare February 23, 2026 02:05
@bug-ops bug-ops merged commit a9ac193 into main Feb 23, 2026
20 checks passed
@bug-ops bug-ops deleted the refactor/architectural-improvements branch February 23, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation needs-review Needs review rust Rust code changes size: XXL >1000 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant