Skip to main content

resolve_document_dirs

Function resolve_document_dirs 

Source
pub fn resolve_document_dirs(
    documents: &[String],
    base_dir: Option<&Path>,
) -> Vec<PathBuf>
Expand description

Resolve documents roots against the ledger’s directory.

Ungated: the loader itself calls these to raise E7006, and it needs to do so whether or not validation is on. Resolve documents option directories to filesystem paths.

Absolute entries pass through; relative entries join onto base_dir when it is Some, otherwise are kept as-is (single-file buffers without an on-disk path). Shared so check and the LSP resolve document directories identically.

NOT gated on the validation feature. It used to be, which is half of why the E7006 existence check in options.rs grew its own Path::new(value) instead of calling this — and that resolved against the process CWD (#1999). A path helper with no validation dependency has no reason to be unavailable to the loader.