Skip to content

Replace async-trait with native async traits in zeph-tools/search_code.rs #1733

@bug-ops

Description

@bug-ops

Problem

crates/zeph-tools/src/search_code.rs uses the async-trait crate for SemanticSearchBackend and LspSearchBackend traits (3 occurrences). This contradicts the Edition 2024 rule: native async traits should be used everywhere.

Proposed Changes

  1. Remove #[async_trait] from SemanticSearchBackend and LspSearchBackend trait definitions
  2. Convert async fn declarations to use impl Future<Output = ...> + Send return position syntax if object safety is needed, or keep async fn if concrete dispatch is sufficient
  3. Update all implementations
  4. Remove async-trait from zeph-tools/Cargo.toml if no other usages remain

Note on zeph-acp

The zeph-acp crate also uses #[async_trait::async_trait(?Send)] in ~18 places. This is likely required by the agent-client-protocol SDK which defines traits using this macro. That usage should be documented as an accepted exception rather than removed.

Files

  • crates/zeph-tools/src/search_code.rs
  • crates/zeph-tools/Cargo.toml

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorCode refactoring without functional changestech-debtTechnical debt

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions