Skip to main content

perl_workspace/
lib.rs

1//! Workspace indexing and refactoring orchestration for Perl.
2//!
3//! Maintains an in-memory index of all symbols, references, and module
4//! declarations across a Perl workspace. Provides incremental update, a
5//! document store for open files, and coordinates cross-file operations
6//! such as workspace-wide rename and symbol search.
7//!
8//! # Module guide
9//!
10//! - [`api`] — curated, conflict-free re-exports for workspace bootstrap flows.
11//! - [`discovery`] / [`folder`] / [`ignore`] — workspace root/file discovery helpers.
12//! - [`monitoring`], [`slo`], [`state_machine`] — lifecycle policy + observability.
13//! - [`workspace`] — indexing engine, caches, coordinator, and rename support.
14
15#![deny(unsafe_code)]
16#![deny(unreachable_pub)]
17#![cfg_attr(test, allow(clippy::panic, clippy::unwrap_used, clippy::expect_used))]
18#![warn(rust_2018_idioms)]
19#![warn(missing_docs)]
20#![warn(clippy::all)]
21#![allow(
22    clippy::too_many_lines,
23    clippy::module_name_repetitions,
24    clippy::cast_possible_truncation,
25    clippy::cast_sign_loss,
26    clippy::cast_precision_loss,
27    clippy::cast_possible_wrap,
28    clippy::must_use_candidate,
29    clippy::missing_errors_doc,
30    clippy::missing_panics_doc,
31    clippy::wildcard_imports,
32    clippy::enum_glob_use,
33    clippy::match_same_arms,
34    clippy::if_not_else,
35    clippy::struct_excessive_bools,
36    clippy::items_after_statements,
37    clippy::return_self_not_must_use,
38    clippy::unused_self,
39    clippy::collapsible_match,
40    clippy::collapsible_if,
41    clippy::only_used_in_recursion,
42    clippy::items_after_test_module,
43    clippy::while_let_loop,
44    clippy::single_range_in_vec_init,
45    clippy::arc_with_non_send_sync,
46    clippy::needless_range_loop,
47    clippy::result_large_err,
48    clippy::if_same_then_else,
49    clippy::should_implement_trait,
50    clippy::manual_flatten,
51    clippy::needless_raw_string_hashes,
52    clippy::single_char_pattern,
53    clippy::uninlined_format_args
54)]
55
56pub use perl_parser_core::line_index;
57pub use perl_parser_core::{Node, NodeKind, SourceLocation};
58pub use perl_parser_core::{Parser, ast, position};
59
60/// Unified public API surface.
61pub mod api;
62/// Git-aware workspace file discovery.
63pub mod discovery;
64/// Workspace folder URI/path parsing.
65pub mod folder;
66/// Workspace noise filtering rules.
67pub mod ignore;
68/// Monitoring, limits, and lifecycle instrumentation primitives.
69pub mod monitoring;
70/// Semantic shadow-compare receipt model for old-vs-new workspace query outputs.
71pub mod semantic_shadow_compare;
72/// Service-level objective tracking for workspace index operations.
73pub mod slo;
74
75/// Index lifecycle state machine.
76pub mod state_machine;
77
78/// Canonical semantic substrate: fact population, indexes, and query facade.
79pub mod semantic;
80
81/// Workspace indexing and refactoring orchestration.
82pub mod workspace;
83
84/// Workspace document storage and cache management.
85pub use workspace::document_store;
86/// Workspace-wide symbol index and lookup utilities.
87pub use workspace::workspace_index;
88/// Workspace rename operations for cross-file symbol changes.
89pub use workspace::workspace_rename;
90
91#[cfg(test)]
92mod workspace_index_utf16_test;