relay_knowledge/code/
mod.rs1mod common;
4mod config_files;
5mod error;
6pub(crate) mod feature_flags;
7mod identity;
8mod index;
9mod parser;
10mod registration;
11mod search;
12mod source;
13
14#[cfg(test)]
15#[path = "tests/source/declarations.rs"]
16mod source_declaration_tests;
17#[cfg(test)]
18#[path = "tests/source/filesystem.rs"]
19mod source_filesystem_tests;
20#[cfg(test)]
21#[path = "tests/source/layout.rs"]
22mod source_layout_tests;
23#[cfg(test)]
24#[path = "tests/source/submodule_followup.rs"]
25mod source_submodule_followup_tests;
26#[cfg(test)]
27#[path = "tests/source/submodule_regression.rs"]
28mod source_submodule_regression_tests;
29#[cfg(test)]
30#[path = "tests/source/submodule_review.rs"]
31mod source_submodule_review_tests;
32#[cfg(test)]
33#[path = "tests/source/submodule.rs"]
34mod source_submodule_tests;
35#[cfg(test)]
36#[path = "tests/fixtures.rs"]
37mod test_fixtures;
38#[cfg(test)]
39mod tests;
40#[cfg(test)]
41#[path = "tests/source/worktree_overlay.rs"]
42mod worktree_overlay_tests;
43
44pub use error::CodeIndexError;
45pub use index::{CodeIndexPlan, prepare_full_index_plan};
46pub use index::{
47 build_index_snapshot, changed_paths_for_diff, changed_paths_for_diff_with_filters,
48 changed_paths_for_diff_with_path_filters, deleted_symbol_names_for_diff,
49};
50pub use registration::register_repository;
51pub use scope::{partition_changed_paths_for_selector, preview_repository_scope};
52pub use source::resolution::{
53 resolve_repository_ref, resolve_repository_ref_with_filters,
54 resolve_repository_ref_with_path_filters, resolve_repository_snapshot,
55 resolve_repository_snapshot_with_filters, resolve_repository_snapshot_with_path_filters,
56};
57
58#[cfg(test)]
59pub(crate) use changes::{
60 reset_tracked_entries_call_count_for_root, tracked_entries_call_count_for_root,
61};
62#[cfg(test)]
63pub(crate) use git::{
64 git_ls_tree_full_scan_call_count_for_root, git_show_call_count_for_root,
65 reset_git_ls_tree_full_scan_call_count_for_root, reset_git_show_call_count_for_root,
66};
67pub(crate) use index::changed_paths_for_filesystem_diff;
68#[cfg(test)]
69use index::impact_paths_from_changes;
70#[cfg(test)]
71pub(crate) use index::mutate_next_filesystem_full_snapshot_read;
72pub(crate) use index::{build_index_snapshot_with_base_commit, repository_uses_filesystem_source};
73pub(crate) use registration::REGISTRATION_LANGUAGE_FILTER_ERROR;
74pub(crate) use search::{
75 SOURCE_GREP_CANDIDATE_FILE_LIMIT, SourceGrepKind, SourceGrepMatch, SourceGrepOutcome,
76 SourceGrepRequest, source_grep_matches,
77};
78#[cfg(test)]
79use source::gitlink as source_gitlink;
80pub(crate) use source::roots as source_roots;
81use source::{changes, declarations as source_declarations, git, layout as scope};
82pub(crate) use source_declarations::{
83 SourceDeclarationMatch, safe_git_blob_path, simple_source_identifier,
84 source_declarations_for_identity, source_line_defines_identity,
85};
86
87use common::{ids, languages};
88use ids::{stable_content_hash, stable_id};
89use index::snapshot;
90use index::snapshot::SnapshotBuild;
91#[cfg(test)]
92use parser::parse_indexed_file;
93
94#[cfg(test)]
95use {
96 crate::domain::{
97 CodeFileFingerprint, CodeIndexMode, CodeRepositoryRegistration, CodeRepositorySelector,
98 },
99 changes::{tracked_entries, worktree_changed_paths},
100 identity::resolve_reference_targets,
101 languages::language_id,
102 scope::{path_is_selected, path_scope_allows, path_scope_overlaps},
103 source::{RepositorySourceKind, source_snapshot_batch_bytes},
104};