Overview
The src/manifest.rs module currently exceeds the project's ≤400-line limit and needs to be decomposed into focused submodules to reduce complexity and improve code organization.
Proposed Submodule Decomposition
manifest/yaml_diag.rs
YamlDiagnostic type and implementation
map_yaml_error function
to_span utility
- Error hints and diagnostic helpers
manifest/jinja_helpers.rs
env_var function
render_* functions (template rendering utilities)
eval_expression function
- Template processing helpers
manifest/glob.rs
- Glob normalisation utilities
- Path validation logic
- Glob pattern processing
Keep in src/manifest.rs
- Main manifest structure definitions
- Public API surface
- Module re-exports and coordination
Benefits
- Adherence to project's ≤400-line standard
- Reduced module complexity
- Improved separation of concerns by functionality
- Enhanced maintainability and testability
- Clearer organization of YAML diagnostics, Jinja processing, and glob handling
Context
This refactoring requirement was identified during code review of PR #152.
Reference: #152
Overview
The
src/manifest.rsmodule currently exceeds the project's ≤400-line limit and needs to be decomposed into focused submodules to reduce complexity and improve code organization.Proposed Submodule Decomposition
manifest/yaml_diag.rsYamlDiagnostictype and implementationmap_yaml_errorfunctionto_spanutilitymanifest/jinja_helpers.rsenv_varfunctionrender_*functions (template rendering utilities)eval_expressionfunctionmanifest/glob.rsKeep in
src/manifest.rsBenefits
Context
This refactoring requirement was identified during code review of PR #152.
Reference: #152