Skip to main content

Crate fallow_core

Crate fallow_core 

Source
Expand description

fallow-core is the internal implementation crate behind the fallow analyzer. External embedders should consume the curated programmatic surface at fallow_api (e.g. run_dead_code, run_boundary_violations, run_duplication, run_health). The typed run_* functions are the primary embedder contract; serialize typed output with the matching serialize_*_programmatic_json helper only at a protocol boundary. See ADR-008 for the policy, and docs/fallow-core-migration.md for the function-by-function migration map. Items in this crate may change in any release, including patch releases. Publishing remains transitional while fallow-engine still depends on core internals.

Modules§

analyze
cache
Re-exports from fallow-extract::cache.
churn
Git churn analysis for hotspot detection.
cross_reference
Cross-reference duplication findings with dead code analysis results.
discover
duplicates
Code duplication / clone detection module.
extract
Re-exports from fallow-extract.
git_env
Helpers for invoking git from fallow without inheriting ambient repo state from the parent process.
graph
Module dependency graph with re-export chain propagation and reachability analysis.
graph_cache
Persisted graph-cache identity contracts and on-disk store.
plugins
Plugin system for framework-aware codebase analysis.
project
Centralized project state with file registry and workspace metadata.
resolve
Import specifier resolution using oxc_resolver.
results
suppress
trace
trace_chain
Symbol-level call chains (fallow trace <symbol> --callers --callees).

Functions§

build_dead_code_graph
Build the module graph for an engine-owned dead-code pipeline.
discover_dead_code_entry_points
Discover entry points for an engine-owned dead-code pipeline.
prepare_dead_code_backend_prelude
Prepare plugin and script context for engine-owned dead-code orchestration.
resolve_cache_max_size_bytes
Resolve config.cache_max_size_mb into bytes, falling back to the extract crate’s DEFAULT_CACHE_MAX_SIZE. Lives at this layer (not on ResolvedConfig) because fallow-config does not depend on fallow-extract; the bytes conversion is owned by the cache callsite. Public so CLI subcommands that load the cache directly (flags, health, coverage analyze) can call it without re-deriving the same fallback policy.
resolve_dead_code_imports
Resolve imports for an engine-owned dead-code pipeline.
run_dead_code_detectors
Run the dead-code detectors for an engine-owned pipeline.
try_load_dead_code_graph_cache
Try loading the graph cache for an engine-owned dead-code pipeline.