Skip to main content

MAX_CONFIG_ANCESTOR_DEPTH

Constant MAX_CONFIG_ANCESTOR_DEPTH 

Source
pub const MAX_CONFIG_ANCESTOR_DEPTH: usize = 64;
Expand description

Shared upper bound on how many ancestor directories a config-file discovery walk climbs, independent of whether the filesystem root has been reached.

deps-gradle, deps-cargo, deps-npm, and deps-nuget all import this canonical definition directly for their own workspace-root / config-file ancestor walks, rather than each declaring their own duplicate. 64 directories up is not a realistic project layout — a pathologically deep or hostile tree hits this cap instead of doing unbounded work per parse (CWE-400).