Skip to main content

resolve_include

Function resolve_include 

Source
pub fn resolve_include(
    target: &TargetTreeIndex,
    source_path: &RelativePath,
    directive: &IncludeDirective,
) -> Result<RelativePath, Vec<RelativePath>>
Expand description

Try to find the on-target path the include directive points at. Returns Ok(found) on resolution, Err(attempted_paths) when none of the candidate target paths exist.

source_path is the touched .erl or .hrl that carries the directive: needed to resolve -include(path) relative to the source file’s directory.