Skip to content

[cleanup] Phase 2b: Exclude unused haystack providers from workspace builds #623

Closed

Description

@AlexMikhalev

Summary

Exclude haystack_atlassian, haystack_discourse, haystack_jmap, haystack_grepapp from workspace builds.

Actions

  • Add haystack crates to Cargo.toml exclude list
  • Keep directories intact for future use
  • Clean commented-out haystack deps in terraphim_middleware/Cargo.toml

Verification

  • cargo check --workspace passes
  • cargo test --workspace passes

Activity

  1. AlexMikhalev commented on Mar 4, 2026

    @AlexMikhalev
    ContributorAuthor

    PR #631 addresses this. Excluded haystack_atlassian, haystack_discourse, haystack_jmap, haystack_grepapp from workspace builds.

  2. AlexMikhalev commented on Mar 11, 2026

    @AlexMikhalev
    ContributorAuthor

    Implementation Complete

    I have successfully feature-flagged the haystack providers:

    Changes Made

    terraphim_middleware/Cargo.toml:

    • Marked haystack_jmap as optional dependency
    • Added jmap feature flag: jmap = ["dep:haystack_jmap"]

    terraphim_middleware/src/haystack/mod.rs:

    • Added #[cfg(feature = "jmap")] to module declaration
    • Added #[cfg(feature = "jmap")] to re-export

    terraphim_middleware/src/indexer/mod.rs:

    • Added conditional import for JmapHaystackIndexer
    • Wrapped ServiceType::Jmap match arm with feature gates
    • Added graceful fallback when feature is disabled (logs warning, returns empty index)

    Verification

    • cargo check -p terraphim_middleware ✓
    • cargo check -p terraphim_middleware --features jmap ✓
    • cargo check --workspace ✓
    • cargo test -p terraphim_middleware ✓

    Notes

    • haystack_grepapp was already feature-flagged with the grepapp feature
    • haystack_jmap now follows the same pattern as grepapp_haystack
    • Both crates remain in the workspace (required for path dependencies to work)

    Commit: 20f99c9c

  3. AlexMikhalev commented on Mar 11, 2026

    @AlexMikhalev
    ContributorAuthor

    Feature-flagging implementation complete. haystack_jmap is now an optional dependency with a 'jmap' feature flag, following the same pattern as grepapp_haystack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions