1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Project root lifecycle management
//!
//! This module implements the behaviors defined in `docs/architecture/PROJECT_ROOT_SPEC.md`:
//!
//! - **ProjectManager**: Routes file paths to Projects based on `ProjectRootMode`
//! - **Project**: Owns a `CodeGraph`, file table, and caches for one index root
//! - **RepoId**: Tracks which git repository each file belongs to
//!
//! # Architecture Overview
//!
//! ```text
//! ┌─────────────────────────────────────────────────────────────┐
//! │ ProjectManager │
//! │ - mode: ProjectRootMode │
//! │ - projects: HashMap<ProjectId, Arc<Project>> │
//! │ - workspace_folders: Vec<PathBuf> │
//! └─────────────────────────────────────────────────────────────┘
//! │
//! │ project_for_path()
//! ▼
//! ┌─────────────────────────────────────────────────────────────┐
//! │ Project │
//! │ - id: ProjectId │
//! │ - index_root: PathBuf │
//! │ - graph: CodeGraph │
//! │ - repo_index: HashMap<PathBuf, RepoId> │
//! │ - file_table: HashMap<StringId, FileEntry> │
//! └─────────────────────────────────────────────────────────────┘
//! ```
//!
//! # Modes
//!
//! - **GitRoot** (default): Each git repository gets its own Project
//! - **WorkspaceFolder**: Each VS Code workspace folder gets a Project
//! - **WorkspaceRoot**: Single Project covering all workspace folders
//!
//! # Lifecycle
//!
//! 1. **Create**: On first file routed to an index_root
//! 2. **Initialize**: Empty graph, caches, watchers
//! 3. **Build**: Full index scan
//! 4. **Update**: Incremental updates on file changes
//! 5. **Destroy**: On workspace removal or shutdown
// Re-export primary types
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;