Skip to content

build: cargo build --no-default-features does not compile, and CI does not check it #793

Closed

Description

@ajianaz

What

cargo check --no-default-features (no Tree-sitter) fails on develop:

error[E0432]: unresolved import `crate::index::ast`   (src/index/extract.rs, detect_routes)
error[E0433]: cannot find `ast` in `index`

detect_routes returns crate::index::ast::AstEdge, but the ast module only exists with the tree-sitter feature. The README and docs/code-intelligence.md say a build without default features falls back to regex-only extraction, and extract_all has a #[cfg(not(feature = "tree-sitter"))] branch for it, so the configuration is meant to work.

Why

The regex-only build is documented but unusable, and nothing would have caught the regression: CI only builds with --features tree-sitter.

Testing

  • cargo check --no-default-features and cargo test --no-default-features pass.
  • A CI job (or an extra step in Check) runs cargo check --no-default-features so the break cannot return.

Activity

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