Repository navigation
fix(build): compile and test the build without Tree-sitter, and check it in CI - #806
Merged
Merged
Conversation
… it in CI Closes #793.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
AstEdge,EdgeKindand theirCallSiteconversions move fromsrc/index/ast.rs(only built with thetree-sitterfeature) to a new always-builtsrc/index/edge.rs.KgEdgeis now one type in both configurations: the separate stub struct for the no-Tree-sitter build is gone, anddetect_routes(regex) returns the same edge type in both.cargo build --no-default-featurescompiles again.pub(crate),pub(super)andpub(in ..)items (and so reported nothing for a lot of real code), and readconst fn nameas a constant calledfn. A test (rust_regex_handles_restricted_visibility_and_const_fn) covers every item kind; it was red first.test_index_run_auto_prunes_deleted_filesseedededgesrows directly but relied on the extractor forcall_graphrows; it now seeds both, since it tests pruning and not extraction.cfg_attr(not(feature = "tree-sitter"), allow(dead_code)).Checkjob ofci.ymllints (clippy -D warnings) and tests the build without Tree-sitter, so it cannot break unnoticed again. It is the same job, so the list of required checks does not change.Why
The README and
docs/code-intelligence.mddocument a regex-only build,extract_allhas a branch for it, and nothing built it: it failed to compile ondevelopfor a long time. Closes #793.Testing
cargo check,cargo clippy --all-targets -- -D warningsandcargo testpass in both configurations: 1552 tests with--features tree-sitter, 1519 with--no-default-features(the others need Tree-sitter), 0 failures.--no-default-featuresbinary: it indexes a small Rust project andcora dead-codefinds the unused function.cargo fmt --all -- --checkclean; Cora review of the staged diff: no findings.