Expand description
fdl schema sub-command: discover every cache under the project,
report fresh / stale / orphan states, and clear or refresh on
demand. The Schema type itself lives in config.
fdl schema — inspect, clear, and refresh cached --fdl-schema
outputs across the project.
Caches live at <cmd_dir>/.fdl/schema-cache/<cmd-name>.json (see
crate::schema_cache for the per-command mechanics). This module
walks the project tree to find every cache, reports staleness, and
exposes clear / refresh operations. It’s intentionally a filesystem
scan rather than a command-graph walk: any layout that ends up
writing a cache file gets discovered, regardless of how the
commands: tree is shaped.
Structs§
- Cache
Entry - One cached schema discovered on disk.
- Refresh
Result
Enums§
- Cache
Status - Freshness of a cache file relative to its source
fdl.yml.
Functions§
- clear_
caches - Delete cache files.
filterrestricts the operation to a single command name;Noneclears all discovered caches. Empty parent.fdl/schema-cache/and.fdl/dirs are removed when nothing else lives inside them. Returns the list of removed cache paths. - discover_
caches - Scan
project_rootrecursively for.fdl/schema-cache/*.jsonfiles. Skips common noise dirs (SKIP_DIRS). Results are sorted by cache path for stablefdl schema listoutput. - refresh_
caches - Probe each cached command’s entry and rewrite its cache file.
filterscopes to a single command name. Returns per-cache results so the caller can print a summary.